SQL can suck sometimes

I know alot of you aren’t interested in the life of a software developer as far as what they (I) do but I have been frustrated with what I’ve been tasked to do. From a pure development standpoint it isn’t anything out of the ordinary. When writing code in Java (as we mostly do here at work) when you are done whatever peice of code you have just written, you write a unit test to test that new (or newly changed) functionality. When you spend most of your day writing T-SQL and then you have to think of how to test what you just wrote, it fucks with your mind. You may then have to figure out how to “test” how many company records were inserted and how many were updated, and was what was inserted or updated actually correct? And what about everything that may be assiciated with those said Companies, did the documents get imported correctly, did they get attached to the correct company and where the text-based comments sucked in and and written to the database correctly, and did you get all of it? There are so many things that need to be tested and QA’d (QA = Quality Assurance) with what i’ve written and the results of what I’ve written that its almost impossible to accomplish. And this all flies in the face (potentially) of good programming techniques and using proper algorithms and error handling and reporting. In Java when you create a simple Logger and write to it in whatever manner you want and the info just automagically appears in the resultant log file. In T-SQL that idea is not an easy thing to accomplish.

Add to all of that the idea that you can change just about everything to do with the SQL Server in T-SQL including not only the schema of the database you are working with but even how the server operates. The building of indexes, the building of and execution of User Defined Functions and Stored Procedures and Views. Its endless!

Of course the complicating factor about all of this is that all of the T-SQL that I write then has to be able to be run on all of our QA SQL Servers, by our QA people, as well as, eventually, our customers’. So applying good programming techniques to T-SQL development is alot of work and I am, in alot of ways a meer novice in this area, and I have been in the IT world for over 20 years! Theres gotta be a better way!

Oh, btw, watch out Europe, the spawn of Doooh will be on his way tonight…you have been warned!

JOKE OF THE DAY:

A filthy rich North Carolina man decided that he wanted to throw a party and invited all of his buddies and neighbors. He also invited Leroy, the only redneck in the neighborhood.

He held the party around the pool in the backyard of his mansion. Leroy was having a good time drinking, dancing, eating shrimp, oysters and BBQ and flirting with all the women.

At the height of the party, the host said, “I have a 10ft man-eating gator in my pool and I’ll give a million dollars to anyone who has the nerve to jump in.”

The words were barely out of his mouth when there was a loud splash and everyone turned around and saw Leroy in the pool!

Leroy was fighting the gator and kicking its ass! Leroy was jabbing the gator in the eyes with his thumbs, throwing punches, head butts and choke holds, biting the gator on the tail and flipping the gator through the air like some kind of Judo Instructor.

The water was churning and splashing everywhere. Both Leroy and the gator were screaming and raising hell. Finally Leroy strangled the gator and let it float to the top like a dime store goldfish. Leroy then slowly climbed out of the pool. Everybody was just staring at him in disbelief.

Finally the host says, “Well, Leroy, I reckon I owe you a million dollars.”

“No, that’s okay. I don’t want it,” said Leroy.

The rich man said, “Man, I have to give you something. You won the bet. How about half a million bucks then?”

“No thanks. I don’t want it,” answered Leroy.

The host said, “Come on, I insist on giving you something. That was amazing. How about a new Porsche and a Rolex and some stock options?”

Again Leroy said no.

Confused, the rich man asked, “Well, Leroy, then what do you want?”

Leroy said, “I want the name of the sumbitch who pushed me in the pool!”

4 Responses to “SQL can suck sometimes”

  1. Izaak Says:

    Allright:
    Your supposed to write tests first… I’m guilty of not doing this as well. But it has been shown to provide better quiality code that is more complete:
    http://c2.com/cgi/wiki?TestDrivenDevelopment
    http://www.extremeprogramming.org/rules/testfirst.html
    http://www.xprogramming.com/xpmag/testFirstGuidelines.htm

    There is pre built stuff to test this: http://sqlunit.sourceforge.net/
    http://www.dallaway.com/acad/dbunit.html
    http://spaces.msn.com/sudheerpalyam/Blog/cns!1pKCMhBsSwPMevqFfdi-3JgQ!196.entry

  2. neen.inch.nails Says:

    i’m totally interested in the life a software developer. ok. not really. but i’m interested in ANYTHING to do with doooh.
    🙂

  3. dooohhead Says:

    Thanks Neener!!!!

  4. Lady Visine Says:

    You hurt my head with all of that. The joke, I liked, tho! Glad I finally found you, via a link on Ben’s blog. 🙂


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: