Sunday, May 20, 2007

The BUG

“The Bug” doesn’t mean any insect OR similar organism but this is about “a software bug”.

When I started my career as a software developer, I didn’t have any idea about software bug. After a weeklong training of PepsiCo retail application (This was the project in which I was supposed to work), my project manager came to me and said here are few bugs for you, handing over to me few printouts. I was amazed with curious confusion and that was the first time I hear about “The bug”. I wondered, “What the hell is this bug?””Am I supposed to tackle “BUGS”? “Is this the job I am into?” Lots of questions and then my colleague cleared my confusion and explained that by definition it means “A defect or a fault in a computer program which prevents it from working properly and usually they arise from mistakes made by programmers”. That was the time and I started a journey of my professional life dealing with bugs.

So for past four years, I’ve been dealing with bugs and not only me but all programmers on earth have to deal with bugs. Daily we come across different kinds of bugs some of them are very easy but some can become a real nightmare. Sometimes after extensive debugging throughout a day when I go to sleep I dream of a bug biting my brain and it does as a fact If you don’t take care and get engrossed too much into it. I would tell you how bug can bite your brain by sharing this anecdote. When I was working at Nvidia (Nvidia is worldwide leader in graphics technology and GPUs – Graphics Processing Units), I came across one bug which took away all my happiness and mental piece. In game “Need for speed” there was a corruption in the back light of a car and the bug requester claimed that Nvidia device driver has screwed something with pixel shaders (pixel shaders are assembly like programs which renders and adds cool visual effects to 3D geometry) and that’s why this backlight is not looking the way it should be.

After this bug was raised, on one fine morning I get a message in my outlook from my beloved manager: “Assigning bug no. 23945 to dhaval”. I looked at it and my face got enlightened. “Need for speed” yeah… Now I’ll be playing NFS as a part of my daily job work… Cool!!! And this in fact was a reason for my coworkers to get envied of me. I heard them narrating me as a luckiest guy who gets paid for playing video games. I played NFS for 1-2 hours but now I’ had to investigate “why the backlight of a racing car was corrupted?” Now I started debugging, hooked up a fire wire cable with debugging machine and started windbg. I spent a whole day and went home. Next day again in the morning started windbg, started looking at the corruption in backlight and there I was going like crazy about the mysterious flaw. Two days, three days and I spent almost five days and applied each and every weapon from my skills set… comparative debugging, backtracking, divide and conquer, performance strategies on and off approach, analyzing pixel shader instructions… every possible problem solving strategy that I could think off but at the end “no clue” and I was still groping in dark. Now the bug really started “BUGging” me. Five days, ten hours each and I started observing outcomes of that long debugging marathon. Now while commuting from home I was keenly observing the back light of real cars passing by, just to see if there is any corruption in it. When I was watching any TV show and by chance if I saw any car, my immediate attention was towards its backlight. The whole situation quite resembled a story of great archer Arjuna who was given a challenge to hit the eye of a fish with his arrow. At that time Arjuna was so much engrossed so that for him the eye of a fish meant the whole world and he couldn’t see anything else except the eye. Here the eye of a fish was a corruption in a car back light and I was Arjuna whose sole objective was to overcome that corruption.

I kept on debugging in a pursuit of “hitting the eye” and on sixth day I saw some silver lining. On that little clue at last I succeeded fixing that bug but I swear those six days were memorable days of my life. It changed my perspective of looking at the world and added a new dimension to my thought process. When I talked about this to Varun (my colleague) he told me “you are not in a job but you are in a career!!!”. He might be correct but I never wanted that kind of “BUGGY” career. Whatever it is but I am aware of the fact that as long as we are in software field thinking of getting rid of bugs is like fooling ourselves. I define “BUG” as a soul of software. In “Bhagwad Gita”, Lord Krishna counsels Arjuna by saying that Body is mortal and the only thing eternal is Soul. Any death would involve the shadding of a body but soul is permanent. In software terms, new applications, new tools will keep on coming and old will get obsolete but the only thing that remains is “The Bug”. It comes to you in one or the other form. I left Nvidia and came to US started working in a company called UPS. Here also on a very next day after joining my lead handed over me few print outs, of course they were “Bugs” only but I didn’t saw a any term such as “Bug” on paper. I jumped out of joy when I came to know that here they use the different term “Defect” and not “The bug”. Ultimately they are bugs only but at last now I get some elegant name: “The Defect”, so still the story is going on but its god’s grace that now on I don’t see anybody talking about OR writing about this loathsome three letter word the “BUG”!!!