Click here to Skip to main content
15,885,767 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 not the most obvious piece of logic. Pin
KP Lee26-Oct-10 11:31
KP Lee26-Oct-10 11:31 
GeneralRe: It's not the most obvious piece of logic. Pin
Dalek Dave26-Oct-10 11:37
professionalDalek Dave26-Oct-10 11:37 
GeneralRe: It's not the most obvious piece of logic. Pin
Stephen Hewitt27-Oct-10 19:02
Stephen Hewitt27-Oct-10 19:02 
GeneralIf Indexing Then Loop Pin
AspDotNetDev22-Oct-10 11:23
protectorAspDotNetDev22-Oct-10 11:23 
GeneralRe: If Indexing Then Loop Pin
HimanshuJoshi22-Oct-10 11:31
HimanshuJoshi22-Oct-10 11:31 
GeneralRe: If Indexing Then Loop Pin
PIEBALDconsult22-Oct-10 16:55
mvePIEBALDconsult22-Oct-10 16:55 
GeneralRe: If Indexing Then Loop Pin
ghle26-Oct-10 1:31
ghle26-Oct-10 1:31 
GeneralStored Procs, Packages, Views...Pah! PinPopular
Richard A. Dalton19-Oct-10 4:16
Richard A. Dalton19-Oct-10 4:16 
Warning: The Following is a Rant.

From time to time I get into the religious 'To Stored Proc or not To Stored Proc' argument.

Let me confess right now. As much as I appreciate all the pro's of Stored Procs, I still prefer to not use them when it can be avoided.

It may be a technically inferior solution but I still prefer to create functions and subs in my VB or C# code that perform the equivalent task.

I have finally decided that the reason for my bias is that the greatest Code Horrors I deal with now are badly written Packages and Stored Procs etc.

It's a bloody nightmare.

And to top it all, I regularly have to deal with the fact that the features needed to debug aren't installed, or they're running some cut down version of a DBMS.

So I'm debugging this rats maze of code using techniques that I haven't used since I wrote Basic on my Sinclair Spectrum. Plug in Values. Run. Check Log File. Nothing Happened. Plug in Values. Run. Check Log File. Something unexpected happened. repeat to fade.

Right now I'm trawling through the PL/SQL code of a very large globally known company. Honestly I've decided that what I'm looking at is a cast off from that team of monkeys that are working on the complete works of Shakespeare.

I also regularly have to deal with Databases that contain hundreds of functions, procs and views where nobody knows if they are needed anymore but everybody is terrified to modify or remove any of them.

I see companies who spawn a new copy every time a proc needs to be changed (just in case) and use that.

I see companies who have no Gold version of their DB. When they need a DB either for test or for a new Production site, they just copy an existing production site.

As for version control. It seems DB Objects live in some abstract zone, like International waters that aren't covered by the treaties that cover version control.

This is no way to live.

Thanks for letting me get that off my chest.
Now back to the rats maze.

-Richard
Hit any user to continue.

GeneralRe: Stored Procs, Packages, Views...Pah! PinPopular
Ray Cassick19-Oct-10 6:48
Ray Cassick19-Oct-10 6:48 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Kevin Drzycimski19-Oct-10 7:10
Kevin Drzycimski19-Oct-10 7:10 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
PoweredByOtgc19-Oct-10 7:19
PoweredByOtgc19-Oct-10 7:19 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Jason Christian20-Oct-10 7:00
Jason Christian20-Oct-10 7:00 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Richard A. Dalton19-Oct-10 7:30
Richard A. Dalton19-Oct-10 7:30 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Andrew Rissing19-Oct-10 7:54
Andrew Rissing19-Oct-10 7:54 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Richard A. Dalton19-Oct-10 8:24
Richard A. Dalton19-Oct-10 8:24 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Ray Cassick19-Oct-10 12:32
Ray Cassick19-Oct-10 12:32 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Richard A. Dalton20-Oct-10 1:32
Richard A. Dalton20-Oct-10 1:32 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
YSLGuru20-Oct-10 10:18
YSLGuru20-Oct-10 10:18 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Ian Shlasko20-Oct-10 10:58
Ian Shlasko20-Oct-10 10:58 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Chris Quinn20-Oct-10 2:22
Chris Quinn20-Oct-10 2:22 
GeneralRe: Stored Procs, Packages, Views...Pah! PinPopular
Trajan McGill20-Oct-10 11:59
Trajan McGill20-Oct-10 11:59 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Richard A. Dalton20-Oct-10 23:21
Richard A. Dalton20-Oct-10 23:21 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Dr.Walt Fair, PE19-Oct-10 13:01
professionalDr.Walt Fair, PE19-Oct-10 13:01 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Rob Grainger19-Oct-10 23:10
Rob Grainger19-Oct-10 23:10 
GeneralRe: Stored Procs, Packages, Views...Pah! Pin
Electron Shepherd19-Oct-10 23:36
Electron Shepherd19-Oct-10 23:36 

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.