Aug 25, 2007

Debugging is funny

When someone says debugging, what is the first thing that comes to your mind? Well if you are a normal person you might wonder if has got something to do with removing pests from your house. Of course for those with a little computer knowledge will say that it is a painstaking process of finding the bugs in the program and eliminate them. Still wondering what could possibly be funny in debugging, right? ;)

Before reading this you if are still baffled about the term debugging then try reading about it in Wikipedia.

Okay one of the simple ways of finding out a bug is by tracking the variables which you might suspect is causing the problem.

So far you are still wondering what is funny about this. Now for the fun part. Yesterday I was watching two of my seniors debugging a big program. This is not a program in JAVA, C, C++, .NET but a COBOL program. The few things to know about COBOL programming is that it is an English like programming language and the number of variables used in the program usually run into thousands. You can imagine how hard it is to debug using the method I described earlier. Yet thats the only method of debugging available to us. To add to the already huge problem at hand, we don't have any documentation for the program. Yet my seniors determined to find the bug start putting print statements, which in COBOL is a DISPLAY statement.

So they start putting DISPLAY statements from the top. In just about all the possible places where they thought there might be a problem.

Here goes the DISPLAY statements.

DISPLAY "ENTER THE DRAGON"
This is the place where the program flow starts.
DISPLAY "DRAGON GETS CONFUSED"
The possible place where they suspect the program logic is going wrong.
DISPLAY "DRAGON DIED"
This is where the program doesn't work as expected.
DISPLAY "DRAGON LIVES"
DISPLAY "DRAGON RETURNS"

While they were seriously putting all these comments I was rolling. This didn't stop there. It went on and on. And at last they found the bug.

1 comment:

  1. Sounds like fun...u could turn debugging into fun time activity like this.
    Believe tis is the best way to drive out the pest!! :)

    ReplyDelete