Click here to Skip to main content
15,892,199 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.

 
JokeRe: Logical genius! Pin
Stanciu Vlad20-May-10 6:08
Stanciu Vlad20-May-10 6:08 
GeneralRe: Logical genius! Pin
scotchfaster20-May-10 7:09
scotchfaster20-May-10 7:09 
GeneralRe: Logical genius! Pin
Simone Serponi21-May-10 4:15
Simone Serponi21-May-10 4:15 
GeneralRe: Logical genius! Pin
cgh197714-Jul-10 6:45
cgh197714-Jul-10 6:45 
GeneralWrong on so many levels PinPopular
ARopo18-May-10 5:33
ARopo18-May-10 5:33 
GeneralRe: Wrong on so many levels PinPopular
Chris Boden18-May-10 6:41
Chris Boden18-May-10 6:41 
GeneralRe: Wrong on so many levels Pin
PIEBALDconsult18-May-10 6:56
mvePIEBALDconsult18-May-10 6:56 
GeneralRe: Wrong on so many levels Pin
ARopo18-May-10 21:47
ARopo18-May-10 21:47 
what I really admire about this is the somewhere it was called and tested like this

if (IsNegative(flVal))

instead of

if (flVal < 0)

though you could argue that the IsNegative function makes it clear to read at the calling end but then you could write the function like this

BOOL IsNegative(float flVal) { return (flVal < 0); }

GeneralRe: Wrong on so many levels Pin
David Skelly18-May-10 22:42
David Skelly18-May-10 22:42 
GeneralRe: Wrong on so many levels Pin
ARopo18-May-10 23:47
ARopo18-May-10 23:47 
GeneralRe: Wrong on so many levels Pin
Luc Pattyn19-May-10 2:24
sitebuilderLuc Pattyn19-May-10 2:24 
GeneralRe: Wrong on so many levels Pin
elchupathingy19-May-10 9:53
elchupathingy19-May-10 9:53 
GeneralWhen is a double a string Pin
Not Active13-May-10 4:02
mentorNot Active13-May-10 4:02 
AnswerRe: When is a double a string PinPopular
Chris Meech13-May-10 4:24
Chris Meech13-May-10 4:24 
GeneralRe: When is a double a string [modified] Pin
Luc Pattyn13-May-10 4:27
sitebuilderLuc Pattyn13-May-10 4:27 
GeneralRe: When is a double a string Pin
Not Active13-May-10 4:38
mentorNot Active13-May-10 4:38 
GeneralRe: When is a double a string Pin
PIEBALDconsult13-May-10 4:44
mvePIEBALDconsult13-May-10 4:44 
GeneralRe: When is a double a string Pin
Luc Pattyn13-May-10 4:44
sitebuilderLuc Pattyn13-May-10 4:44 
GeneralRe: When is a double a string Pin
Chris Losinger17-May-10 16:32
professionalChris Losinger17-May-10 16:32 
GeneralRe: When is a double a string Pin
Luc Pattyn17-May-10 16:44
sitebuilderLuc Pattyn17-May-10 16:44 
GeneralRe: When is a double a string Pin
Chris Losinger18-May-10 1:01
professionalChris Losinger18-May-10 1:01 
GeneralRe: When is a double a string Pin
supercat918-May-10 6:14
supercat918-May-10 6:14 
GeneralRe: When is a double a string Pin
David Skelly13-May-10 4:47
David Skelly13-May-10 4:47 
GeneralRe: When is a double a string Pin
Luc Pattyn13-May-10 4:50
sitebuilderLuc Pattyn13-May-10 4:50 
GeneralRe: When is a double a string Pin
J4amieC13-May-10 5:29
J4amieC13-May-10 5:29 

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.