Click here to Skip to main content
15,915,172 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: Found this little gem in one of the applications Pin
KP Lee17-Dec-12 8:06
KP Lee17-Dec-12 8:06 
GeneralRe: Found this little gem in one of the applications Pin
Super Lloyd17-Dec-12 16:58
Super Lloyd17-Dec-12 16:58 
GeneralRe: Found this little gem in one of the applications Pin
KP Lee18-Dec-12 6:29
KP Lee18-Dec-12 6:29 
GeneralRe: Found this little gem in one of the applications Pin
Super Lloyd18-Dec-12 12:52
Super Lloyd18-Dec-12 12:52 
GeneralFacepalm time. Pin
fjdiewornncalwe13-Dec-12 4:36
professionalfjdiewornncalwe13-Dec-12 4:36 
GeneralRe: Facepalm time. Pin
wout de zeeuw13-Dec-12 4:59
wout de zeeuw13-Dec-12 4:59 
GeneralRe: Facepalm time. Pin
fjdiewornncalwe13-Dec-12 6:44
professionalfjdiewornncalwe13-Dec-12 6:44 
GeneralRe: Facepalm time. Pin
Anna-Jayne Metcalfe13-Dec-12 22:34
Anna-Jayne Metcalfe13-Dec-12 22:34 
That's what unit tests are for, surely?

Debugger based testing is fundamentally limited by the lack of repeatability intrinsic in having a human poking around during the session, whereas automated tests to do the same thing should (if designed correctly) be absolutely repeatable.

As a bonus the tests stick around long after the debug session is ancient history. If someone breaks the code several years from now, the tests will start failing to alert you to that fact.
Anna Rose | [Rose]

Tech Blog | Visual Lint

"Why would anyone prefer to wield a weapon that takes both hands at once, when they could use a lighter (and obviously superior) weapon that allows you to wield multiple ones at a time, and thus supports multi-paradigm carnage?"

GeneralRe: Facepalm time. Pin
KP Lee15-Dec-12 23:58
KP Lee15-Dec-12 23:58 
NewsExtract from the code I'm working on Pin
Super Lloyd10-Dec-12 16:26
Super Lloyd10-Dec-12 16:26 
GeneralRe: Extract from the code I'm working on Pin
Brisingr Aerowing10-Dec-12 17:57
professionalBrisingr Aerowing10-Dec-12 17:57 
GeneralRe: Extract from the code I'm working on Pin
Super Lloyd10-Dec-12 18:13
Super Lloyd10-Dec-12 18:13 
GeneralRe: Extract from the code I'm working on Pin
KP Lee11-Dec-12 12:08
KP Lee11-Dec-12 12:08 
GeneralRe: Extract from the code I'm working on Pin
Super Lloyd11-Dec-12 22:04
Super Lloyd11-Dec-12 22:04 
GeneralRe: Extract from the code I'm working on Pin
Nemanja Trifunovic13-Dec-12 7:29
Nemanja Trifunovic13-Dec-12 7:29 
GeneralRe: Extract from the code I'm working on Pin
Super Lloyd13-Dec-12 13:12
Super Lloyd13-Dec-12 13:12 
GeneralNo foreign keys on the first date. Pin
Brady Kelly9-Dec-12 2:21
Brady Kelly9-Dec-12 2:21 
GeneralRe: No foreign keys on the first date. Pin
KP Lee11-Dec-12 8:17
KP Lee11-Dec-12 8:17 
GeneralRe: No foreign keys on the first date. Pin
Brady Kelly11-Dec-12 8:34
Brady Kelly11-Dec-12 8:34 
GeneralRe: No foreign keys on the first date. Pin
KP Lee11-Dec-12 11:33
KP Lee11-Dec-12 11:33 
GeneralRe: No foreign keys on the first date. Pin
Pete O'Hanlon11-Dec-12 9:10
mvePete O'Hanlon11-Dec-12 9:10 
GeneralRe: No foreign keys on the first date. Pin
Brady Kelly11-Dec-12 16:36
Brady Kelly11-Dec-12 16:36 
GeneralRe: No foreign keys on the first date. Pin
Andrew Rissing13-Dec-12 6:42
Andrew Rissing13-Dec-12 6:42 
GeneralRe: No foreign keys on the first date. Pin
ryan_b200917-Dec-12 6:55
ryan_b200917-Dec-12 6:55 
GeneralRe: No foreign keys on the first date. Pin
Brady Kelly17-Dec-12 7:04
Brady Kelly17-Dec-12 7:04 

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.