Click here to Skip to main content
15,887,683 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: It's a jungle in there Pin
Member 776995910-Aug-11 8:36
Member 776995910-Aug-11 8:36 
GeneralRe: It's a jungle in there Pin
Br.Bill10-Aug-11 6:58
Br.Bill10-Aug-11 6:58 
GeneralRe: It's a jungle in there [modified] Pin
RobCroll14-Aug-11 3:29
RobCroll14-Aug-11 3:29 
GeneralRe: It's a jungle in there Pin
GibbleCH15-Aug-11 5:31
GibbleCH15-Aug-11 5:31 
GeneralRe: It's a jungle in there Pin
richard_k15-Aug-11 21:34
richard_k15-Aug-11 21:34 
GeneralMessage Removed Pin
8-Aug-11 4:13
professionalN_tro_P8-Aug-11 4:13 
GeneralRe: Validation fails so lets not use it Pin
fjdiewornncalwe9-Aug-11 3:28
professionalfjdiewornncalwe9-Aug-11 3:28 
GeneralRe: Validation fails so lets not use it Pin
thoiness1-Sep-11 4:55
thoiness1-Sep-11 4:55 
I've actually done something like this (but never left it in the production code) on a rapidly evolving piece of a class. The purpose behind it is that you originally start out with a method with let's say, 100 lines of code, then the person that was driving the requirements no longer wants the checking, so you go back, and in order to test your entire application quickly without refactoring, you throw the "return true" in there.

Not saying it isn't stupid to allow something like that to end up in production, just saying I've actually done it before for quick testing.
GeneralRe: Validation fails so lets not use it Pin
Shameel9-Aug-11 4:38
professionalShameel9-Aug-11 4:38 
GeneralRe: Validation fails so lets not use it Pin
Chris Berger9-Aug-11 6:18
Chris Berger9-Aug-11 6:18 
GeneralRe: Validation fails so lets not use it Pin
Lutosław11-Aug-11 23:18
Lutosław11-Aug-11 23:18 
GeneralIf not null, return value else return null Pin
Keith Barrow7-Aug-11 1:58
professionalKeith Barrow7-Aug-11 1:58 
GeneralRe: If not null, return value else return null Pin
BillW338-Aug-11 13:32
professionalBillW338-Aug-11 13:32 
GeneralRe: If not null, return value else return null Pin
RobCroll9-Aug-11 0:48
RobCroll9-Aug-11 0:48 
GeneralTricking Microsoft and being shamless PinPopular
xavier morera6-Aug-11 5:27
xavier morera6-Aug-11 5:27 
GeneralRe: Tricking Microsoft and being shamless Pin
Shameel7-Aug-11 4:44
professionalShameel7-Aug-11 4:44 
GeneralRe: Tricking Microsoft and being shamless Pin
BillW338-Aug-11 13:23
professionalBillW338-Aug-11 13:23 
GeneralRe: Tricking Microsoft and being shamless Pin
SeattleC++9-Aug-11 4:20
SeattleC++9-Aug-11 4:20 
GeneralRe: Tricking Microsoft and being shamless Pin
Richard X Menezes7-Aug-11 20:36
Richard X Menezes7-Aug-11 20:36 
GeneralRe: Tricking Microsoft and being shamless Pin
BC3Tech9-Aug-11 3:15
BC3Tech9-Aug-11 3:15 
GeneralRe: Tricking Microsoft and being shamless Pin
xavier morera9-Aug-11 3:23
xavier morera9-Aug-11 3:23 
GeneralRe: Tricking Microsoft and being shamless Pin
MehGerbil9-Aug-11 3:27
MehGerbil9-Aug-11 3:27 
GeneralRe: Tricking Microsoft and being shamless Pin
xavier morera9-Aug-11 3:35
xavier morera9-Aug-11 3:35 
GeneralRe: Tricking Microsoft and being shamless Pin
ely_bob9-Aug-11 3:57
professionalely_bob9-Aug-11 3:57 
GeneralRe: Tricking Microsoft and being shamless Pin
BrainiacV9-Aug-11 4:06
BrainiacV9-Aug-11 4:06 

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.