I want to start out by apologizing to all the non-programmers reading this. I try to avoid talking shop in a public place, but fark it…at least this gives me something else to say today besides “Valentine’s Day Sucks.”
A client has been busting my balls for the last week talking about “I have a random error” and he keeps sending me the same damn error message “Invalid data found in column XYZ” over and over again. At first I’m like, “Dude, you have invalid data!” which he denies, instead he blames it on the latest version of our software. He has no way to reliably recreate the error, but without that, I really have nothing to work with. “It’s random” he parrots to me.
Sorry, buster, but unless you’re having a hardware problem or failure: THERE IS NO SUCH THING AS A RANDOM ERROR!!
This eventually escalates to The Boss, who will no longer be my The Boss after tomorrow; he is transferring to another department. Mr. Random Error sends his code and some example data to The Boss who bounces it back to me because, hey, he’s moving out of our department, and he’s got other things to do. Okay, fine, I’m cool with that, but he didn’t have to be a dick about it, hopefully new The Boss will be cooler.
Randomizer’s dumb luck means I get passed the buck 90 minutes before my scheduled time to leave, and I have tomorrow off, too. Fark.
Those minutes quickly melt away setting up the test environment and getting the crappy code to freaking compile because the Brainiacs who wrote it are using a bunch of old crap that I don’t have referenced because I don’t use old crap. By the time I get all that sorted out, its way past time for me to go and I’m barely getting to the “let’s find out what happened” part, but I decide to stay despite a sweet, sweet, 3-day weekend staring me in the face.
I stay partially because its my job, partially because soon-to-be-former The Boss insisted this be done ASAP, partially out of curiosity as to what is causing the problem, and partially to prove to that jerk Mr. Random Error that he’s full of crap.
It doesn’t take long.
The program starts up as he said it would, data is loaded and everything looks okay…but I notice there are four exceptions in the Output window, and the program is still running?? For the 99% of you that aren’t code monkeys it means the program should have crashed…HARD
I fart around for a bit and get the “Invalid data found” error that started it all. Before the program dies, though, exceptions keep stacking up in the Output window like pancakes at Denny’s on a Sunday morning. It’s not quite Miller Time yet, though, something screwy is going on here. I look for Try-Catch statements in the code (these are used to catch errors) and find the following:
Catch ex Exception
There is NOTHING in the Catch block!? Those of you who are programmers are probably laughing by now, for those that aren’t, that means when something Really Really Bad happens, the program just goes along its merry way as if nothing had happened. Normally, you would DO something about the error and keep the program from crashing.
In this case, something bad DID happen, but nothing is done about it. The errors just keep stacking up and stacking up until the whole thing blows up, which explains why it is (exaggerated finger quotes in mid-air) “RAN-DOM.” I breathe a sigh of relief because this is something we can work with, and I can tell Mr. Random Error that his code sucks and he needs to add some error handling to it. I enjoyed typing every single letter of that fucking email.
I was done at 830; I didn’t send out the email to Mr. Random Error, though, I sent it to The Boss and The Boss’s The Boss to let them know what was going on and to verify my theory is correct. Considering my state of mind when I typed it, some proofreading is probably a good idea, too.
So now I can begin my 3-day weekend, and I think I’ll start it by going out for some buffalo wings…mmm, wing-y!
By the way; Valentine’s Day sucks!