Click here to Skip to main content
15,887,214 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 next big paradigm shift in database design Pin
Jeroen De Dauw24-Mar-10 7:50
Jeroen De Dauw24-Mar-10 7:50 
GeneralRe: The next big paradigm shift in database design Pin
Dave Kreskowiak24-Mar-10 12:50
mveDave Kreskowiak24-Mar-10 12:50 
GeneralRe: The next big paradigm shift in database design Pin
David Skelly24-Mar-10 23:10
David Skelly24-Mar-10 23:10 
GeneralRe: The next big paradigm shift in database design Pin
Luc Pattyn24-Mar-10 13:03
sitebuilderLuc Pattyn24-Mar-10 13:03 
GeneralRe: The next big paradigm shift in database design Pin
peterchen24-Mar-10 22:44
peterchen24-Mar-10 22:44 
GeneralHow to convert minutes into milliseconds... PinPopular
- Tim Cools -19-Mar-10 4:53
- Tim Cools -19-Mar-10 4:53 
GeneralRe: How to convert minutes into milliseconds... Pin
OriginalGriff19-Mar-10 5:55
mveOriginalGriff19-Mar-10 5:55 
GeneralRe: How to convert minutes into milliseconds... Pin
supercat919-Mar-10 6:01
supercat919-Mar-10 6:01 
Perhaps the coder thought it was necessary to convert a DateTime into a TimeSpan before subtracting to yield a TimeSpan? In fact, the difference between two DateTime values is a TimeSpan.

Not sure how to explain some of the other ugliness in the code, though. I can understand cases where one might want to e.g. calculate the number of milliseconds until the start of a minute 'n' minutes from now, but I'm unclear how any of the cases where this function wouldn't return StandardTimer*60000 would be useful.
GeneralRe: How to convert minutes into milliseconds... Pin
Andrew Rissing19-Mar-10 7:08
Andrew Rissing19-Mar-10 7:08 
GeneralRe: How to convert minutes into milliseconds... Pin
PIEBALDconsult19-Mar-10 9:54
mvePIEBALDconsult19-Mar-10 9:54 
GeneralRe: How to convert minutes into milliseconds... Pin
Andrew Rissing19-Mar-10 10:38
Andrew Rissing19-Mar-10 10:38 
GeneralRe: How to convert minutes into milliseconds... Pin
Luc Pattyn19-Mar-10 11:09
sitebuilderLuc Pattyn19-Mar-10 11:09 
GeneralRe: How to convert minutes into milliseconds... Pin
Andrew Rissing19-Mar-10 11:40
Andrew Rissing19-Mar-10 11:40 
GeneralBrowser Support Check Pin
ghaberek9-Mar-10 10:21
ghaberek9-Mar-10 10:21 
JokeRe: Browser Support Check Pin
chevu9-Mar-10 18:12
chevu9-Mar-10 18:12 
GeneralRe: Browser Support Check Pin
Chris Meech10-Mar-10 6:10
Chris Meech10-Mar-10 6:10 
GeneralHow to split a string the hard way (VB6) Pin
AaronM_NZ7-Mar-10 12:58
AaronM_NZ7-Mar-10 12:58 
GeneralRe: How to split a string the hard way (VB6) Pin
GibbleCH8-Mar-10 6:14
GibbleCH8-Mar-10 6:14 
GeneralRe: How to split a string the hard way (VB6) Pin
peterchen9-Mar-10 8:57
peterchen9-Mar-10 8:57 
GeneralRe: How to split a string the hard way (VB6) Pin
OriginalGriff9-Mar-10 9:25
mveOriginalGriff9-Mar-10 9:25 
GeneralRe: How to split a string the hard way (VB6) Pin
Stanciu Vlad9-Mar-10 10:30
Stanciu Vlad9-Mar-10 10:30 
GeneralRe: How to split a string the hard way (VB6) Pin
Paulo Zemek9-Mar-10 10:35
mvaPaulo Zemek9-Mar-10 10:35 
GeneralEver heard of casting? Pin
ArchimaX3-Mar-10 0:49
ArchimaX3-Mar-10 0:49 
GeneralRe: Ever heard of casting? [modified] Pin
OriginalGriff3-Mar-10 1:11
mveOriginalGriff3-Mar-10 1:11 
AnswerMessage Removed Pin
3-Mar-10 1:24
chevu3-Mar-10 1:24 

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.