Click here to Skip to main content
15,896,154 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: Still don't know whether to laugh or cry... Pin
BillW339-Dec-10 2:57
professionalBillW339-Dec-10 2:57 
GeneralRe: Would you laugh or cry? Pin
Ravi Sant22-Dec-10 2:20
Ravi Sant22-Dec-10 2:20 
GeneralSearch the causal link between this and devs going mad o_O Pin
Jeroen De Dauw5-Dec-10 14:55
Jeroen De Dauw5-Dec-10 14:55 
GeneralImplode / Join Pin
Jeroen De Dauw4-Dec-10 17:30
Jeroen De Dauw4-Dec-10 17:30 
GeneralCatch an Exception... then throw it? PinPopular
doja9327-Nov-10 15:13
doja9327-Nov-10 15:13 
GeneralRe: Catch an Exception... then throw it? PinPopular
Rod Kemp27-Nov-10 19:12
Rod Kemp27-Nov-10 19:12 
GeneralRe: Catch an Exception... then throw it? Pin
AspDotNetDev27-Nov-10 19:39
protectorAspDotNetDev27-Nov-10 19:39 
GeneralRe: Catch an Exception... then throw it? Pin
Rod Kemp27-Nov-10 20:20
Rod Kemp27-Nov-10 20:20 
aspdotnetdev wrote:
and a code horror

Personally I would only view this as a true horror if it was done by an experienced developer who should know better, such as that use of Goto that DD shared the other day.
This is a rookie developer that according to the OP kept telling me that she, "..wanted to add exception handling.." to her code which would suggest she didn't know where to start and didn't get any help/tips/pointers on how to go about it.

I think a good way to judge if something is a coding horror is the 2x4 test. If you take into account the experience of the developer and look at the code and think that maybe you should explain how something works, then it's not a horror as such, if however your first thought is, where is that 2x4 so you can beat them over the head with it, then it is a horror.
People are more violently opposed to fur than leather because it's safer to harass rich women than motorcycle gangs

GeneralRe: Catch an Exception... then throw it? Pin
Sandeep Mewara27-Nov-10 19:57
mveSandeep Mewara27-Nov-10 19:57 
GeneralRe: Catch an Exception... then throw it? Pin
doja9328-Nov-10 7:54
doja9328-Nov-10 7:54 
GeneralRe: Catch an Exception... then throw it? Pin
Rod Kemp28-Nov-10 15:04
Rod Kemp28-Nov-10 15:04 
GeneralRe: Catch an Exception... then throw it? Pin
Chadwick Posey29-Nov-10 5:34
Chadwick Posey29-Nov-10 5:34 
GeneralRe: Catch an Exception... then throw it? Pin
Sean Sterling28-Nov-10 20:22
Sean Sterling28-Nov-10 20:22 
GeneralRe: Catch an Exception... then throw it? [modified] Pin
mohan5k29-Nov-10 1:12
professionalmohan5k29-Nov-10 1:12 
GeneralRe: Catch an Exception... then throw it? Pin
Rod Kemp29-Nov-10 18:39
Rod Kemp29-Nov-10 18:39 
GeneralRe: Catch an Exception... then throw it? Pin
mohan5k30-Nov-10 20:00
professionalmohan5k30-Nov-10 20:00 
GeneralRe: Catch an Exception... then throw it? Pin
Bob Doran29-Nov-10 4:45
Bob Doran29-Nov-10 4:45 
GeneralRe: Catch an Exception... then throw it? Pin
taoklerks28-Nov-10 22:10
taoklerks28-Nov-10 22:10 
GeneralRe: Catch an Exception... then throw it? Pin
Rod Kemp28-Nov-10 22:44
Rod Kemp28-Nov-10 22:44 
GeneralRe: Catch an Exception... then throw it? Pin
Spectre_00129-Nov-10 2:32
Spectre_00129-Nov-10 2:32 
GeneralRe: Catch an Exception... then throw it? Pin
Kirk Wood29-Nov-10 14:26
Kirk Wood29-Nov-10 14:26 
GeneralRe: Catch an Exception... then throw it? Pin
Rod Kemp29-Nov-10 18:03
Rod Kemp29-Nov-10 18:03 
GeneralRe: Catch an Exception... then throw it? Pin
musefan30-Nov-10 2:46
musefan30-Nov-10 2:46 
GeneralRe: Catch an Exception... then throw it? Pin
RobCroll27-Nov-10 23:26
RobCroll27-Nov-10 23:26 
GeneralRe: Catch an Exception... then throw it? Pin
Jeroen De Dauw28-Nov-10 4:00
Jeroen De Dauw28-Nov-10 4:00 

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.