Click here to Skip to main content
15,895,538 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
AspDotNetDev20-Oct-10 16:55
protectorAspDotNetDev20-Oct-10 16:55 
GeneralRe: Embrace the dark side - use an ORM Pin
fjdiewornncalwe21-Oct-10 3:34
professionalfjdiewornncalwe21-Oct-10 3:34 
GeneralRe: Embrace the dark side - use an ORM Pin
Richard A. Dalton20-Oct-10 23:28
Richard A. Dalton20-Oct-10 23:28 
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 
ohmyletmein wrote:
Instead of complaining and avoiding the real world, offer your expertise to help others, offer your time to review and explain the hows and whys of your criticisms. Don't let the end product suffer just because some are not as capable as yourself.


I have sort of a problem with your post. But you may have just picked me up wrong.

You seem to think that I think I'm some sort of expert looking down my nose at bad programmers. Far from it. I said explicitly I don't think I am qualified to put complex logic into stored procs.

You say that Data related code belongs in the Database. Well where to you draw that line? Ultimately it's all data related logic right? We build apps that manipulate Data.

What it comes down to is that languages like PL/SQL are fundamentally unsuited to representing complex logic.

Here's an example and this is code that comes from Oracle of all companies. I'm trying to change the date on a contract. I have to call a function in package. The log file for toggling that currency runs to over 40 PAGES if I paste it into word.

Other similar small changes produce log files that are over 100 pages. And it isn't becuase the logging is very detailed, it's because there is a shed load of business rules veing validated.

This logic is virtually impossible to debug. It might be possible to rewrite this logic in PL/SQL and improve it but I don't believe it could ever be represented as elegantly and as simply as it could be in proper high level programming language.

PL/SQL is for relatively simple querying and manipulation of data and rudimentary validation. When things get more complicated than that It might not be suitable at all, or if it is "possible" the level of skill requried is frankly beyond the majority of developers (including me).

-Rd
Hit any user to continue.

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 
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 PinPopular
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 

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.