Maggie Nelson

databases and code goodness

WTF indeed!

TAGS: None

Most of you are probably familiar with The Daily WTF: Curious Perversions in Information Technology. Yes, other people’s crappy code is hilarious, but it’s also educational to see. (And maybe you ARE doing something crappy and you just hid it so well other people haven’t found it yet?)
If you enjoy this type of thing (who doesn’t?) and you’re into databases and especially Oracle, there’s a site inspired by The Daily WTF just for Oracle blunders! Check it out: Oracle WTF!
I found out about this via Tom Kyte’s post, so I might as well also share some of his awesomeness:

As an aside, anyone that knows me, knows my mantra – written many times:

  • You should do it in a single SQL statement if at all possible.
  • If you cannot do it in a single SQL Statement, then do it in PL/SQL (as little PL/SQL as possible!).
  • If you cannot do it in PL/SQL, try a Java Stored Procedure. The number of times this is necessary is extremely rare today with Oracle9i and above.
  • If you cannot do it in Java, do it in a C external procedure. This is most frequently the approach when raw speed, or the use of a 3rd party API written in C is needed.
  • If you cannot do it in a C external routine, you might want to seriously think about why it is you need to do it…

Ok, back to writing good code, not crappy at all! :)

TAGS: None

Comments are closed.

© 2010 Maggie Nelson. All Rights Reserved.

This blog is powered by the Wordpress platform and beach rentals.