Click here to Skip to main content
15,171,731 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: It's alive.....! Pin
phil.o15-Oct-15 1:01
mvephil.o15-Oct-15 1:01 
GeneralWTF Pin
Brisingr Aerowing15-Aug-15 12:46
professionalBrisingr Aerowing15-Aug-15 12:46 
GeneralRe: WTF Pin
Sander Rossel15-Aug-15 14:29
professionalSander Rossel15-Aug-15 14:29 
GeneralRe: WTF Pin
kmoorevs15-Aug-15 15:22
Memberkmoorevs15-Aug-15 15:22 
GeneralRe: WTF Pin
Amarnath S15-Aug-15 19:13
professionalAmarnath S15-Aug-15 19:13 
GeneralRe: WTF Pin
Weylyn Cadwell17-Aug-15 12:31
MemberWeylyn Cadwell17-Aug-15 12:31 
GeneralRe: WTF Pin
User 1013254618-Sep-15 6:38
MemberUser 1013254618-Sep-15 6:38 
GeneralIs this the worst code in the world? Pin
Sean McPoland12-Aug-15 21:12
MemberSean McPoland12-Aug-15 21:12 
this was from a year or two ago...really!

I was investing a batch scheduling issue using CA-Scheduler.

The program in COBOL had the following code (paraphrased as I've forgotten it all).

TestTime:
If time <> 2am then
Wait 1 second
Goto testTime
End If

This program at the beginning of a schedule of 1,200 nightly would start somewhere usually between 11:30 and midnight because of changes to the schedule.

It worked like this for 5 years before anyone challenged what was happening with the batch cycle.

On review the programmer put the code in because the tester insisted on seeing the code work at 2am...there is no scheduler in developement or UAT, and of course the code never ever came out....

Once fixed the schedule dropped from 9 hours to less than 4....

Go testers!!!

GeneralRe: Is this the worst code in the world? Pin
ravikhoda13-Aug-15 1:07
professionalravikhoda13-Aug-15 1:07 
GeneralRe: Is this the worst code in the world? Pin
Tim Carmichael13-Aug-15 4:24
MemberTim Carmichael13-Aug-15 4:24 
GeneralRe: Is this the worst code in the world? Pin
Power Puff Boy13-Aug-15 4:28
MemberPower Puff Boy13-Aug-15 4:28 
GeneralRe: Is this the worst code in the world? Pin
Mark Whybird13-Aug-15 21:26
MemberMark Whybird13-Aug-15 21:26 
GeneralRe: Is this the worst code in the world? Pin
Member 1070767714-Aug-15 0:02
MemberMember 1070767714-Aug-15 0:02 
GeneralRe: Is this the worst code in the world? Pin
Mark Whybird13-Aug-15 21:47
MemberMark Whybird13-Aug-15 21:47 
GeneralRe: Is this the worst code in the world? Pin
Weston Miller14-Aug-15 4:32
MemberWeston Miller14-Aug-15 4:32 
GeneralRe: Is this the worst code in the world? Pin
Kirk 1038982114-Aug-15 5:01
MemberKirk 1038982114-Aug-15 5:01 
GeneralRe: Is this the worst code in the world? Pin
Dan Sutton14-Aug-15 8:24
MemberDan Sutton14-Aug-15 8:24 
GeneralRe: Is this the worst code in the world? Pin
Dan Sutton14-Aug-15 8:29
MemberDan Sutton14-Aug-15 8:29 
GeneralRe: Is this the worst code in the world? Pin
PIEBALDconsult14-Aug-15 8:34
professionalPIEBALDconsult14-Aug-15 8:34 
GeneralRe: Is this the worst code in the world? Pin
BrainiacV14-Aug-15 10:43
MemberBrainiacV14-Aug-15 10:43 
GeneralRe: Is this the worst code in the world? Pin
Manfred Rudolf Bihy14-Aug-15 10:51
professionalManfred Rudolf Bihy14-Aug-15 10:51 
GeneralRe: Is this the worst code in the world? Pin
jibalt14-Aug-15 13:29
Memberjibalt14-Aug-15 13:29 
GeneralRe: Is this the worst code in the world? Pin
Al Chak15-Aug-15 23:16
MemberAl Chak15-Aug-15 23:16 
GeneralRe: Is this the worst code in the world? Pin
Dr Gadgit30-Sep-15 9:24
MemberDr Gadgit30-Sep-15 9:24 
GeneralRe: Is this the worst code in the world? Pin
BruceN5-Oct-15 10:39
MemberBruceN5-Oct-15 10:39 

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.