Click here to Skip to main content
15,888,461 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: Is this a coding horror? Pin
ii_noname_ii30-Aug-11 3:37
ii_noname_ii30-Aug-11 3:37 
GeneralRe: Is this a coding horror? Pin
Stefan_Lang30-Aug-11 3:49
Stefan_Lang30-Aug-11 3:49 
GeneralRe: Is this a coding horror? Pin
IAbstract30-Aug-11 4:13
IAbstract30-Aug-11 4:13 
GeneralRe: Is this a coding horror? Pin
Schmuli30-Aug-11 23:10
Schmuli30-Aug-11 23:10 
GeneralRe: Is this a coding horror? Pin
IAbstract31-Aug-11 1:27
IAbstract31-Aug-11 1:27 
GeneralRe: Is this a coding horror? Pin
Jim (SS)30-Aug-11 6:06
Jim (SS)30-Aug-11 6:06 
GeneralRe: Is this a coding horror? Pin
Kenneth Kasajian30-Aug-11 9:10
Kenneth Kasajian30-Aug-11 9:10 
GeneralRe: Is this a coding horror? Pin
OriginalGriff30-Aug-11 9:19
mveOriginalGriff30-Aug-11 9:19 
Firstly, no, Visual Studio on a 22" monitor, so I don't have that excuse.
Secondly, if the two do not optimize to the same code, then someone as Microsoft should be up against the wall.
Thirdly, I think the VS compiler will allow single step only on the second version.
Finally, no, I did it because it seemed reasonable at the time, after I had removed a pile of code (which is why it has a dumb name - it didn't for long and got deleted completely soon afterwards) When I realized what I had left myself, the initial response was "Yeuch"! So I stuck it here.

It realized some interesting responses - from my point of view it is pretty nasty, and not something I would want to leave in production code. Interesting that some people seem to think it is fine, if it is commented!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

Manfred R. Bihy: "Looks as if OP is learning resistant."

GeneralRe: Is this a coding horror? Pin
Kenneth Kasajian30-Aug-11 19:13
Kenneth Kasajian30-Aug-11 19:13 
GeneralRe: Is this a coding horror? Pin
OriginalGriff30-Aug-11 21:43
mveOriginalGriff30-Aug-11 21:43 
GeneralRe: Is this a coding horror? Pin
BobJanova30-Aug-11 23:07
BobJanova30-Aug-11 23:07 
GeneralRe: Is this a coding horror? Pin
Tech Code Freak30-Aug-11 20:30
Tech Code Freak30-Aug-11 20:30 
GeneralRe: Is this a coding horror? Pin
Tom Chantler1-Sep-11 3:06
professionalTom Chantler1-Sep-11 3:06 
GeneralRe: Is this a coding horror? Pin
thoiness1-Sep-11 5:14
thoiness1-Sep-11 5:14 
GeneralTryParse - you should Try understanding!!! Pin
VallarasuS26-Aug-11 21:17
VallarasuS26-Aug-11 21:17 
JokeRe: TryParse - you should Try understanding!!! Pin
Manfred Rudolf Bihy27-Aug-11 23:22
professionalManfred Rudolf Bihy27-Aug-11 23:22 
JokeRe: TryParse - you should Try understanding!!! Pin
Chris Meech29-Aug-11 4:03
Chris Meech29-Aug-11 4:03 
GeneralRe: TryParse - you should Try understanding!!! Pin
Manfred Rudolf Bihy30-Aug-11 0:39
professionalManfred Rudolf Bihy30-Aug-11 0:39 
GeneralRe: TryParse - you should Try understanding!!! Pin
Shameel27-Aug-11 23:43
professionalShameel27-Aug-11 23:43 
GeneralRe: TryParse - you should Try understanding!!! Pin
Bernhard Hiller28-Aug-11 23:09
Bernhard Hiller28-Aug-11 23:09 
GeneralGoto vs if/esle PinPopular
Not Active26-Aug-11 9:24
mentorNot Active26-Aug-11 9:24 
GeneralRe: Goto vs if/esle Pin
ekolis29-Aug-11 3:43
ekolis29-Aug-11 3:43 
GeneralRe: Goto vs if/esle Pin
BobJanova30-Aug-11 2:44
BobJanova30-Aug-11 2:44 
GeneralRe: Goto vs if/esle Pin
AdamEcc30-Aug-11 3:10
AdamEcc30-Aug-11 3:10 
GeneralRe: Goto vs if/esle Pin
Rob Grainger5-Sep-11 1:46
Rob Grainger5-Sep-11 1:46 

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.