Click here to Skip to main content
15,867,308 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: invert if : visual studio code helper Pin
Bernhard Hiller4-Aug-20 20:31
Bernhard Hiller4-Aug-20 20:31 
JokeRe: invert if : visual studio code helper Pin
Nelek4-Aug-20 21:44
protectorNelek4-Aug-20 21:44 
GeneralRe: invert if : visual studio code helper Pin
raddevus5-Aug-20 2:09
mvaraddevus5-Aug-20 2:09 
GeneralRe: invert if : visual studio code helper Pin
obermd5-Aug-20 4:07
obermd5-Aug-20 4:07 
GeneralRe: invert if : visual studio code helper Pin
raddevus5-Aug-20 4:23
mvaraddevus5-Aug-20 4:23 
GeneralRe: invert if : visual studio code helper Pin
Greg Utas5-Aug-20 4:22
professionalGreg Utas5-Aug-20 4:22 
GeneralRe: invert if : visual studio code helper Pin
raddevus5-Aug-20 4:31
mvaraddevus5-Aug-20 4:31 
GeneralRe: invert if : visual studio code helper Pin
OriginalGriff5-Aug-20 5:24
mveOriginalGriff5-Aug-20 5:24 
I prefer your version, but VS can get weird with it's hints.
Sometimes it makes a suggestion, you let it implement it, and it immediately suggests something else and offers you the original code you wrote.
For example:
C#
StringBuilder sb = new StringBuilder(120);
Suggestion: Use an implicit type:
C#
var sb = new StringBuilder(120);

Now it suggests Use an explicit type instead of 'var':
C#
StringBuilder sb = new StringBuilder(120);
Which is what I prefer anyway ...
Sigh | :sigh:
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: invert if : visual studio code helper Pin
raddevus5-Aug-20 8:15
mvaraddevus5-Aug-20 8:15 
GeneralRe: invert if : visual studio code helper Pin
Nelek5-Aug-20 8:51
protectorNelek5-Aug-20 8:51 
GeneralRe: invert if : visual studio code helper Pin
Jon McKee12-Aug-20 11:23
professionalJon McKee12-Aug-20 11:23 
GeneralRe: invert if : visual studio code helper Pin
Dan Neely10-Aug-20 8:57
Dan Neely10-Aug-20 8:57 
GeneralRe: invert if : visual studio code helper Pin
jsc4210-Aug-20 23:19
professionaljsc4210-Aug-20 23:19 
GeneralRe: invert if : visual studio code helper Pin
Greg Utas11-Aug-20 1:12
professionalGreg Utas11-Aug-20 1:12 
GeneralEgyptology and computer science Pin
Randor 4-Aug-20 4:48
professional Randor 4-Aug-20 4:48 
GeneralRe: Egyptology and computer science Pin
raddevus4-Aug-20 5:25
mvaraddevus4-Aug-20 5:25 
GeneralRe: Egyptology and computer science Pin
Randor 4-Aug-20 8:02
professional Randor 4-Aug-20 8:02 
GeneralRe: Egyptology and computer science Pin
honey the codewitch4-Aug-20 5:51
mvahoney the codewitch4-Aug-20 5:51 
GeneralRe: Egyptology and computer science Pin
Randor 4-Aug-20 8:23
professional Randor 4-Aug-20 8:23 
GeneralRe: Egyptology and computer science Pin
honey the codewitch4-Aug-20 8:36
mvahoney the codewitch4-Aug-20 8:36 
GeneralRe: Egyptology and computer science Pin
Rick York4-Aug-20 11:16
mveRick York4-Aug-20 11:16 
GeneralRe: Egyptology and computer science Pin
Randor 4-Aug-20 11:50
professional Randor 4-Aug-20 11:50 
GeneralFound on TDWTF Pin
Brisingr Aerowing30-Jul-20 8:49
professionalBrisingr Aerowing30-Jul-20 8:49 
GeneralRe: Found on TDWTF Pin
User 1106097930-Jul-20 9:13
User 1106097930-Jul-20 9:13 
General99 bottles of beer in Malbolge Pin
Brisingr Aerowing29-Jun-20 6:17
professionalBrisingr Aerowing29-Jun-20 6:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.