Click here to Skip to main content
15,893,668 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: Bored of if..else? Pin
Roger Wright3-Aug-10 20:55
professionalRoger Wright3-Aug-10 20:55 
GeneralRe: Bored of if..else? Pin
VaKa11-Aug-10 9:27
VaKa11-Aug-10 9:27 
GeneralRe: Bored of if..else? [modified] Pin
BillW3325-Aug-10 6:12
professionalBillW3325-Aug-10 6:12 
GeneralClustering... The hard way! Pin
Geoff Bolton28-Jul-10 17:44
Geoff Bolton28-Jul-10 17:44 
GeneralRe: Clustering... The hard way! Pin
Super Lloyd28-Jul-10 20:49
Super Lloyd28-Jul-10 20:49 
GeneralRe: Clustering... The hard way! Pin
leppie28-Jul-10 21:57
leppie28-Jul-10 21:57 
GeneralRe: Clustering... The hard way! Pin
Jeroen De Dauw29-Jul-10 3:14
Jeroen De Dauw29-Jul-10 3:14 
GeneralRe: Clustering... The hard way! Pin
supercat929-Jul-10 4:50
supercat929-Jul-10 4:50 
The for() loops seem a rather verbose way of generating all 37,442,160 combinations of 15 pairs chosen from 28, but I wouldn't say they're necessarily horrible. If it is indeed necessary to enumerate all the combinations, nested 'for' loops seem a verbose but time-efficient way to do it. The w1..w15 calculations seem icky, though. Much better to compute the sum of dis1..dis15, and subtract one item from that computation.
GeneralRe: Clustering... The hard way! Pin
dybs29-Jul-10 18:11
dybs29-Jul-10 18:11 
GeneralRe: Clustering... The hard way! Pin
Lutosław30-Jul-10 2:05
Lutosław30-Jul-10 2:05 
GeneralRe: Clustering... The hard way! Pin
James Lonero4-Aug-10 18:39
James Lonero4-Aug-10 18:39 
GeneralIE Invisible DIV Bug Pin
AspDotNetDev28-Jul-10 11:58
protectorAspDotNetDev28-Jul-10 11:58 
GeneralRe: IE Invisible DIV Bug Pin
Luc Pattyn28-Jul-10 12:19
sitebuilderLuc Pattyn28-Jul-10 12:19 
GeneralRe: IE Invisible DIV Bug Pin
AspDotNetDev28-Jul-10 12:23
protectorAspDotNetDev28-Jul-10 12:23 
GeneralRe: IE Invisible DIV Bug Pin
Daniel 'Tak' M.28-Jul-10 13:12
Daniel 'Tak' M.28-Jul-10 13:12 
GeneralRe: IE Invisible DIV Bug Pin
Hired Mind5-Aug-10 11:10
Hired Mind5-Aug-10 11:10 
GeneralRe: IE Invisible DIV Bug Pin
AspDotNetDev5-Aug-10 12:06
protectorAspDotNetDev5-Aug-10 12:06 
GeneralRe: IE Invisible DIV Bug Pin
AspDotNetDev5-Aug-10 12:07
protectorAspDotNetDev5-Aug-10 12:07 
JokeOpinions PinPopular
SirTimothy27-Jul-10 19:38
SirTimothy27-Jul-10 19:38 
GeneralRe: Opinions PinPopular
OriginalGriff27-Jul-10 20:38
mveOriginalGriff27-Jul-10 20:38 
GeneralRe: Opinions Pin
Rob Grainger27-Jul-10 23:00
Rob Grainger27-Jul-10 23:00 
GeneralRe: Opinions Pin
riced27-Jul-10 23:23
riced27-Jul-10 23:23 
GeneralRe: Opinions Pin
QuiJohn28-Jul-10 2:56
QuiJohn28-Jul-10 2:56 
GeneralRe: Opinions Pin
SirTimothy28-Jul-10 8:14
SirTimothy28-Jul-10 8:14 
GeneralRe: Opinions Pin
Gary R. Wheeler1-Aug-10 0:25
Gary R. Wheeler1-Aug-10 0:25 

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.