Friday, May 4, 2007

Thwarted Once Again

I've been quite busy with home stuff. We're approved for a mortgage now, so all that's left is to wait... and buy as much furniture and linens and stuff as we can stuff in my car. Also Annie and I are running again, so that takes some time.

I wanted to mention work blockages again. I mentioned previously how a seemingly impossible error can derail your work almost instantly. But sometimes it's not an impossible problem that can stop you. In my case, it was a 900-line SQL stored procedure.

I may have mentioned this before, but basically, this sproc, written by my coworker, creates a pivot table... in SQL. I had to make my own version of it with half the features his did. That was tough, and my brain threw some roadblocks in my way, but I made it through.

Then came the horrible moment. I foound out I'd have to restore all that insane code I mercilessly cut out. NOOOOOOOOOOOOOO!!!!!!!!!! [a la Darth Vader]

And so, for the past three days, I'd get into work, get my coffee, load up Visual Studio, poke around for a while, see my "TODO:" statements politely reminding me to "Fix the goddamned stored procedure from hell", fire up SQL Query Analyzer, load the stored procedure (via sp_helptext), then stare at the SQL until my eyes bleed (well, it feels like they do). This is not healthy.

I finally was able to figure out the problem and fix the code. So what's my point? I'm not sure. Maybe it's that debugging large SQL procedures is not why I decided to be a programmer.
Post a Comment
All rights reserved. Take that!