Click here to Skip to main content
15,887,477 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: The "best" way ever to compare two dates... Pin
BillW3312-May-11 4:18
professionalBillW3312-May-11 4:18 
GeneralWhy oh why??? Pin
emartinho5-May-11 8:48
emartinho5-May-11 8:48 
GeneralRe: Why oh why??? Pin
RobCroll6-May-11 3:24
RobCroll6-May-11 3:24 
GeneralRe: Why oh why??? Pin
Marc A. Brown6-May-11 4:50
Marc A. Brown6-May-11 4:50 
GeneralRe: Why oh why??? Pin
emartinho6-May-11 5:56
emartinho6-May-11 5:56 
GeneralRe: Why oh why??? PinPopular
Luc Pattyn6-May-11 4:04
sitebuilderLuc Pattyn6-May-11 4:04 
GeneralRe: Why oh why??? Pin
Marc A. Brown6-May-11 4:50
Marc A. Brown6-May-11 4:50 
GeneralRe: Why oh why??? Pin
emartinho6-May-11 5:53
emartinho6-May-11 5:53 
That's a great point and here's my 5.

These vars could never have that type of situation due to how they get their data, but the basic premise you point out is correct.

Assuming that the 2 vars refer to the same type of data (i.e. a "ColourStyle"), but from 2 different sources, I still don't see why someone would create that line of code. What design instructions would lead someone to use that type of logic? Any ideas, I'm interested to see other's take on this.

-EM
GeneralRe: Why oh why??? Pin
Blake Miller6-May-11 7:17
Blake Miller6-May-11 7:17 
GeneralRe: Why oh why??? Pin
Pong D. Panda6-May-11 22:06
Pong D. Panda6-May-11 22:06 
GeneralThe mysteriously deleted file PinPopular
Joe Woodbury4-May-11 7:22
professionalJoe Woodbury4-May-11 7:22 
GeneralBrilliant Logic PinPopular
Roman_wolf3-May-11 21:59
Roman_wolf3-May-11 21:59 
GeneralRe: Brilliant Logic PinPopular
musefan4-May-11 3:00
musefan4-May-11 3:00 
GeneralRe: Brilliant Logic Pin
BillW334-May-11 3:05
professionalBillW334-May-11 3:05 
JokeRe: Brilliant Logic Pin
Manfred Rudolf Bihy4-May-11 3:19
professionalManfred Rudolf Bihy4-May-11 3:19 
GeneralRe: Brilliant Logic....for checking NANs Pin
Kevin Drzycimski4-May-11 4:08
Kevin Drzycimski4-May-11 4:08 
GeneralRe: Brilliant Logic....for checking NANs [modified] Pin
BobJanova4-May-11 6:03
BobJanova4-May-11 6:03 
GeneralRe: Brilliant Logic....for checking NANs Pin
AspDotNetDev4-May-11 6:39
protectorAspDotNetDev4-May-11 6:39 
GeneralRe: Brilliant Logic....for checking NANs <- portable Pin
Kevin Drzycimski8-May-11 6:53
Kevin Drzycimski8-May-11 6:53 
GeneralRe: Brilliant Logic....for checking NANs Pin
AspDotNetDev4-May-11 6:44
protectorAspDotNetDev4-May-11 6:44 
JokeRe: Brilliant Logic Pin
Marc A. Brown4-May-11 5:20
Marc A. Brown4-May-11 5:20 
GeneralRe: Brilliant Logic Pin
gavindon4-May-11 12:00
gavindon4-May-11 12:00 
GeneralRe: Brilliant Logic Pin
RobCroll6-May-11 3:17
RobCroll6-May-11 3:17 
JokeRe: Brilliant Logic Pin
Dr.Luiji6-May-11 5:47
professionalDr.Luiji6-May-11 5:47 
GeneralRe: Brilliant Logic for the UN and bankers PinPopular
Bob10006-May-11 5:56
professionalBob10006-May-11 5:56 

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.