Click here to Skip to main content
15,878,945 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: When to check for null ? PinPopular
CDP180212-Jul-12 14:26
CDP180212-Jul-12 14:26 
JokeRe: When to check for null ? Pin
Sasha Laurel12-Jul-12 16:10
Sasha Laurel12-Jul-12 16:10 
GeneralRe: When to check for null ? Pin
CDP180212-Jul-12 23:18
CDP180212-Jul-12 23:18 
GeneralRe: When to check for null ? Pin
Andrei Straut11-Jul-12 5:04
Andrei Straut11-Jul-12 5:04 
GeneralRe: When to check for null ? Pin
CDP180211-Jul-12 5:11
CDP180211-Jul-12 5:11 
GeneralRe: When to check for null ? Pin
Jasmine250111-Jul-12 5:06
Jasmine250111-Jul-12 5:06 
GeneralRe: When to check for null ? Pin
Sasha Laurel11-Jul-12 5:08
Sasha Laurel11-Jul-12 5:08 
GeneralRe: When to check for null ? Pin
Andrei Straut11-Jul-12 6:14
Andrei Straut11-Jul-12 6:14 
Sasha Laurel wrote:
That's a great idea. Now if only I had the access to do that...


In this case, yes, suicide is a very tempting alternative.
Homicide, on the other hand, mmm... Wink | ;) Wink | ;) ...sweet

I've found a nice way to punish the original coders when I come across stuff like this. Ask them what they intended to do in that portion(s) of the code, and WHY they did it so. It's not offensive, and it's perfectly justifiable.
Now, one of two things may happen:
- You, made to look like a fool if they can come up with a good explanation why they did what they did (which is ok with me, 'cause at least I can understand, and I don't mind admitting sometimes I'm just plain dumb), or
- The 'WTF-did-I-do-here-can't-remember-can't-justify look on their faces, which is purely priceless (it may not help in untangling that code, but my ego will feel a really nice tickle-tingle)

Now, in your specific case, I have no idea what would help, short of modifying the whole codebase Frown | :( Frown | :(
GeneralRe: When to check for null ? Pin
BobJanova11-Jul-12 6:32
BobJanova11-Jul-12 6:32 
GeneralRe: When to check for null ? Pin
Sasha Laurel11-Jul-12 8:28
Sasha Laurel11-Jul-12 8:28 
GeneralRe: When to check for null ? Pin
Paul Conrad11-Jul-12 11:37
professionalPaul Conrad11-Jul-12 11:37 
GeneralRe: When to check for null ? Pin
Sasha Laurel11-Jul-12 12:16
Sasha Laurel11-Jul-12 12:16 
GeneralRe: When to check for null ? Pin
Paul Conrad11-Jul-12 17:45
professionalPaul Conrad11-Jul-12 17:45 
GeneralRe: When to check for null ? Pin
KP Lee11-Jul-12 19:27
KP Lee11-Jul-12 19:27 
GeneralRe: When to check for null ? Pin
SortaCore12-Jul-12 2:37
SortaCore12-Jul-12 2:37 
GeneralRe: When to check for null ? Pin
KP Lee11-Jul-12 19:21
KP Lee11-Jul-12 19:21 
GeneralRe: When to check for null ? Pin
Sasha Laurel12-Jul-12 5:00
Sasha Laurel12-Jul-12 5:00 
GeneralRe: When to check for null ? Pin
KP Lee12-Jul-12 15:21
KP Lee12-Jul-12 15:21 
GeneralRe: When to check for null ? Pin
Sasha Laurel12-Jul-12 16:03
Sasha Laurel12-Jul-12 16:03 
GeneralRe: When to check for null ? Pin
Sasha Laurel12-Jul-12 16:08
Sasha Laurel12-Jul-12 16:08 
GeneralRe: When to check for null ? Pin
KP Lee12-Jul-12 16:46
KP Lee12-Jul-12 16:46 
GeneralRateOfInterest... Pin
Sandeep Mewara10-Jul-12 5:04
mveSandeep Mewara10-Jul-12 5:04 
GeneralRe: RateOfInterest... Pin
PIEBALDconsult10-Jul-12 11:05
mvePIEBALDconsult10-Jul-12 11:05 
AnswerRe: RateOfInterest... Pin
Sandeep Mewara10-Jul-12 19:46
mveSandeep Mewara10-Jul-12 19:46 
GeneralRe: RateOfInterest... Pin
PIEBALDconsult11-Jul-12 3:42
mvePIEBALDconsult11-Jul-12 3:42 

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.