Click here to Skip to main content
15,886,590 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: Gem... As time goes by.. Pin
GenJerDan12-Jan-12 3:05
GenJerDan12-Jan-12 3:05 
GeneralRe: Gem... As time goes by.. Pin
Steve Burchett12-Jan-12 10:13
Steve Burchett12-Jan-12 10:13 
GeneralRe: Gem... As time goes by.. Pin
krumia14-Feb-12 19:10
krumia14-Feb-12 19:10 
GeneralRe: Gem... As time goes by.. PinPopular
Robert Rohde8-Jan-12 23:54
Robert Rohde8-Jan-12 23:54 
GeneralRe: Gem... As time goes by.. Pin
virang_219-Jan-12 0:07
virang_219-Jan-12 0:07 
GeneralRe: Gem... As time goes by.. Pin
BobJanova9-Jan-12 0:54
BobJanova9-Jan-12 0:54 
GeneralRe: Gem... As time goes by.. Pin
ii_noname_ii9-Jan-12 1:36
ii_noname_ii9-Jan-12 1:36 
GeneralRe: Gem... As time goes by.. Pin
Stefan_Lang10-Jan-12 5:36
Stefan_Lang10-Jan-12 5:36 
Some more:
- no test to verify input value range or format (this would be neglectable if using correct types as you've already implied with your point 'Using strings')
- using switch without default case
- using hard coded strings for "AM" and "PM"
- combining a yes/no test with an unrelated display functionality into one function (note that a test for AM and PM implies that a 24h format is being converted to a 12h format, and thus the test needs to be repeated in order to convert the number part!)
GeneralRe: Gem... As time goes by.. Pin
Lilith.C10-Jan-12 9:03
Lilith.C10-Jan-12 9:03 
GeneralRe: Gem... As time goes by.. Pin
BobJanova12-Jan-12 23:43
BobJanova12-Jan-12 23:43 
GeneralRe: Gem... As time goes by.. Pin
Lilith.C13-Jan-12 5:04
Lilith.C13-Jan-12 5:04 
GeneralRe: Gem... As time goes by.. Pin
0bx9-Jan-12 22:45
0bx9-Jan-12 22:45 
GeneralRe: Gem... As time goes by.. Pin
edmurphy9910-Jan-12 3:57
edmurphy9910-Jan-12 3:57 
GeneralRe: Gem... As time goes by.. Pin
Fabio Franco10-Jan-12 6:09
professionalFabio Franco10-Jan-12 6:09 
GeneralRe: Gem... As time goes by.. Pin
Eddy Vluggen10-Jan-12 6:55
professionalEddy Vluggen10-Jan-12 6:55 
GeneralRe: Gem... As time goes by.. Pin
Albert Holguin10-Jan-12 7:29
professionalAlbert Holguin10-Jan-12 7:29 
GeneralRe: Gem... As time goes by.. Pin
Spectre_00110-Jan-12 9:37
Spectre_00110-Jan-12 9:37 
GeneralRe: Gem... As time goes by.. Pin
Eugene Lepekhin10-Jan-12 10:23
Eugene Lepekhin10-Jan-12 10:23 
GeneralRe: Gem... As time goes by.. Pin
virang_2110-Jan-12 11:07
virang_2110-Jan-12 11:07 
GeneralRe: Gem... As time goes by.. Pin
Mark_Wallace10-Jan-12 22:39
Mark_Wallace10-Jan-12 22:39 
GeneralThe mystery function Pin
Pascal Ganaye8-Jan-12 21:49
Pascal Ganaye8-Jan-12 21:49 
GeneralRe: The mystery function PinPopular
Nagy Vilmos8-Jan-12 22:53
professionalNagy Vilmos8-Jan-12 22:53 
GeneralRe: The mystery function Pin
Sentenryu8-Jan-12 23:11
Sentenryu8-Jan-12 23:11 
GeneralRe: The mystery function PinPopular
harold aptroot8-Jan-12 23:21
harold aptroot8-Jan-12 23:21 
GeneralRe: The mystery function Pin
Pascal Ganaye11-Jan-12 21:45
Pascal Ganaye11-Jan-12 21:45 

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.