Click here to Skip to main content
15,887,336 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.

 
GeneralHow to group by hour properly. [modified] Pin
Brady Kelly20-Aug-09 22:33
Brady Kelly20-Aug-09 22:33 
GeneralRe: How to group by hour properly. Pin
David Skelly21-Aug-09 0:49
David Skelly21-Aug-09 0:49 
GeneralRe: How to group by hour properly. Pin
Brady Kelly21-Aug-09 0:53
Brady Kelly21-Aug-09 0:53 
GeneralRe: How to group by hour properly. Pin
ClementsDan21-Aug-09 15:22
ClementsDan21-Aug-09 15:22 
GeneralRe: How to group by hour properly. Pin
MaksimP25-Sep-09 10:07
MaksimP25-Sep-09 10:07 
GeneralHow to handle dates _properly_. [modified] Pin
Brady Kelly20-Aug-09 12:31
Brady Kelly20-Aug-09 12:31 
GeneralRe: How to handle dates _properly_. Pin
Keith Barrow20-Aug-09 23:03
professionalKeith Barrow20-Aug-09 23:03 
GeneralRe: How to handle dates _properly_. Pin
supercat921-Aug-09 10:14
supercat921-Aug-09 10:14 
Isn't it wonderful how he can just add the integer 20 to the substring '09', and get a year value of 2009? I am forever in awe.

Whether or not it was reasonable for programmers in the 80's and 90's to figure their code would be obsolete before the year 2000, I see no reason to believe that any code written today will not be obsolete before the year 2100. At least the programmer deserves credit for not trying to add punctuation to convert the string to mm-dd-yy form and doing an unadorned parse on that (which would succeed or fail depending upon locale).
GeneralRe: How to handle dates _properly_. Pin
Dan Neely21-Aug-09 10:41
Dan Neely21-Aug-09 10:41 
GeneralRe: How to handle dates _properly_. Pin
supercat924-Aug-09 11:05
supercat924-Aug-09 11:05 
GeneralRe: How to handle dates _properly_. Pin
ClementsDan21-Aug-09 15:38
ClementsDan21-Aug-09 15:38 
GeneralRe: How to handle dates _properly_. [modified] Pin
Vozzie224-Aug-09 16:15
Vozzie224-Aug-09 16:15 
GeneralPractically The Entire Article Pin
Rick York17-Aug-09 6:19
mveRick York17-Aug-09 6:19 
GeneralHow to get today's date PinPopular
Keith Barrow14-Aug-09 0:26
professionalKeith Barrow14-Aug-09 0:26 
GeneralRe: How to get today's date Pin
Nelson Costa Inácio14-Aug-09 1:49
Nelson Costa Inácio14-Aug-09 1:49 
GeneralRe: How to get today's date Pin
MaksimP25-Sep-09 9:55
MaksimP25-Sep-09 9:55 
GeneralRe: How to get today's date Pin
David Skelly14-Aug-09 2:49
David Skelly14-Aug-09 2:49 
GeneralRe: How to get today's date Pin
Keith Barrow14-Aug-09 3:20
professionalKeith Barrow14-Aug-09 3:20 
GeneralRe: How to get today's date Pin
Luc Pattyn14-Aug-09 3:41
sitebuilderLuc Pattyn14-Aug-09 3:41 
GeneralRe: How to get today's date Pin
David Skelly14-Aug-09 5:24
David Skelly14-Aug-09 5:24 
GeneralRe: How to get today's date Pin
David Skelly14-Aug-09 5:06
David Skelly14-Aug-09 5:06 
GeneralRe: How to get today's date Pin
dojohansen15-Oct-09 2:53
dojohansen15-Oct-09 2:53 
GeneralRe: How to get today's date Pin
Carl B. Johnson16-Aug-09 14:27
Carl B. Johnson16-Aug-09 14:27 
GeneralRe: How to get today's date Pin
David Skelly16-Aug-09 22:34
David Skelly16-Aug-09 22:34 
GeneralRe: How to get today's date Pin
Carl B. Johnson17-Aug-09 0:25
Carl B. Johnson17-Aug-09 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.