Nov 28, 2011
“Phil? Hey, Phil? Phil! Phil Connors? Phil Connors, I thought that was you!”- Ned Ryerson – Groundhog Day
Ned is like a NullPointerException that refuses to go away. Ned is a unrecognized selector thrown against a strongly typed variable. Ned is a HTTP timeout error when you’ve set all your timeouts to infinite. Ned is a ‘invalid attribute in XML fragment’ error in a XML document with nothing but elements. In short, Ned is every error that refuses to go away, no matter how hard you stomp on it, seemingly defying all logic and reason.While writing code is akin to being Maverick in Top Gun (ok, maybe more like Chappy in Iron Eagle), debugging is akin to being Bill Murray in Groundhog Day.
Groundhog Day is the story of a weatherman (Bill Murray) stuck in the same day, repeating the same moments over and over and over again in a some sort of perverted infinite loop. That very much sums up how I feel when I debug code. I set up the same breakpoints,hit the same sequence of debugging keys,examine the same variables on the stack, changing maybe one input in an effort to isolate the bug. Eventually, I hit the bug, and if I have not figured out why it happened through the previous set of steps, I find myself right back at the beginning and forced to begin the entire process again. If you could look at my keyboard, you would see the F5 (Run/Debug) and F10 (Step Over) keys completely rubbed of text from the countless hours of my life spent as Dr. Kimble hunting the never-ending series of one-armed bugs that enter my life.
After 4 or 5 repetitions, I am about ready to drop a toaster in my bathtub. If its a particularly nasty bug, buried deep within the mines of polymorphism, well then, it might take 30 repetitions of doing the exact same thing before I am able to isolate the cause of the error.
The most frustrating aspect of programming is that I can spend entire life ages of the Earth hunting for an elusive bug. Yet, in the end, when I finally fixed it and can return to the gun slinging Wild Wild West of writing code, the only thing I have to show for all that effort is “hey Earl, look! it dont crash no more!”