Click here to Skip to main content
16,013,548 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: Embrace the dark side - use an ORM Pin
AspDotNetDev21-Oct-10 7:14
protectorAspDotNetDev21-Oct-10 7:14 
GeneralRe: Embrace the dark side - use an ORM Pin
Stryder_121-Oct-10 3:26
Stryder_121-Oct-10 3:26 
GeneralRe: Embrace the dark side - use an ORM Pin
AspDotNetDev21-Oct-10 7:16
protectorAspDotNetDev21-Oct-10 7:16 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
ohmyletmein21-Oct-10 12:47
ohmyletmein21-Oct-10 12:47 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Richard A. Dalton21-Oct-10 23:28
Richard A. Dalton21-Oct-10 23:28 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
fjdiewornncalwe22-Oct-10 2:25
professionalfjdiewornncalwe22-Oct-10 2:25 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Schmuli23-Oct-10 22:19
Schmuli23-Oct-10 22:19 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
richard_k26-Oct-10 21:48
richard_k26-Oct-10 21:48 
I suspect that I used to work for that same globally known company.. and I've seen PL/SQL that would make a grown man sit down and ball like a baby. Think spaghetti code with a very inconsistent use of badly named exceptions (think some exceptions floating up to the top caller, where NO handler existed for it, others being thrown locally but and not handled, etc etc.). I literally had to comment every line of 20 odd routines to figure out that rats nest. I knew the guy that wrote it.. nice guy, but couldn't code for his own life.

That said, in agreement with other posters.. I've also seen such atrocities in other languages. I've been programming for 28 years professionally, and I've had two projects handed to me that were such utter messes that starting over was the only way to go. In both cases I was able to save about 20% of the code base from the gallows, and the rest were sent to their eternal rest.. In the latest (c++): 5 threads, no locks, sleeps used to affect a very bad semblance of synchronization, and the SAME code piece copied like 30 times (it checked device state to make sure that the next statements were going to have an effect). The code was so buggy that in the 20% saved, I had to dig bugs out of it that had been hidden by the more hideous (and spectacularly more fatal) race conditions.

Egad.
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
marc_k18-Nov-10 0:22
marc_k18-Nov-10 0:22 
GeneralReturn of an old friend Pin
Rob Grainger19-Oct-10 0:02
Rob Grainger19-Oct-10 0:02 
JokeRe: Return of an old friend Pin
Chris Meech19-Oct-10 1:47
Chris Meech19-Oct-10 1:47 
GeneralRe: Return of an old friend PinPopular
Richard A. Dalton19-Oct-10 2:11
Richard A. Dalton19-Oct-10 2:11 
GeneralRe: Return of an old friend Pin
Sauro Viti19-Oct-10 2:19
professionalSauro Viti19-Oct-10 2:19 
GeneralRe: Return of an old friend Pin
_Erik_19-Oct-10 2:53
_Erik_19-Oct-10 2:53 
GeneralRe: Return of an old friend Pin
Rob Grainger19-Oct-10 3:13
Rob Grainger19-Oct-10 3:13 
GeneralRe: Return of an old friend Pin
Richard A. Dalton19-Oct-10 3:29
Richard A. Dalton19-Oct-10 3:29 
GeneralSome more pain (the non-local local) Pin
leppie17-Oct-10 20:28
leppie17-Oct-10 20:28 
GeneralRe: Some more pain (the non-local local) Pin
Bernhard Hiller17-Oct-10 20:45
Bernhard Hiller17-Oct-10 20:45 
GeneralRe: Some more pain (the non-local local) [modified] Pin
leppie17-Oct-10 20:50
leppie17-Oct-10 20:50 
GeneralRe: Some more pain (the non-local local) Pin
BillW3318-Oct-10 5:45
professionalBillW3318-Oct-10 5:45 
GeneralI just got greeted by this Pin
leppie17-Oct-10 19:02
leppie17-Oct-10 19:02 
GeneralRe: I just got greeted by this Pin
Jeroen De Dauw17-Oct-10 20:20
Jeroen De Dauw17-Oct-10 20:20 
GeneralRe: I just got greeted by this Pin
leppie17-Oct-10 20:23
leppie17-Oct-10 20:23 
GeneralRe: I just got greeted by this Pin
Richard A. Dalton18-Oct-10 0:17
Richard A. Dalton18-Oct-10 0:17 
GeneralRe: I just got greeted by this Pin
BillW3318-Oct-10 5:42
professionalBillW3318-Oct-10 5:42 

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.