Tuesday, November 20, 2012

Debugging gone awry


My previous post reminded me of another incident involving computers that I was involved in. It is not with pleasure that I look back at the changed computer, the floppy disk, the sleepless night, the copying disaster, the note on the door, the woebegone expression of Sisyphus...I see that you are fogged so I will start at the beginning which, I never tire of reminding you, was also told by the king of Alice's Adventures in Wonderland to Alice during her adventures in Wonderland.

During a computer course at IIMA, we  had to write some program. Different groups had different projects. We had completed writing most of the program and only the  tiresome debugging process was left. It was at this time that Fate and I had an entanglement which is, as Salman Rushdie says in Midnight's Children, '...at the best of times a dangerous sort of involvement'. In Leave it to Psmith, P.G. Wodehouse writes:
The fact that many writers in their time have commented at some length on the mysterious manner in which Fate is apt to perform its work must not deter us now from a brief survey of this latest manifestation of its ingenious methods.
In the normal course of events, there would have been an uneventful few hours in the computer room where we were working. But as luck would have it, the computer room where we were working developed some problem and we had to shift to another computer room in a neighbouring building to complete the project.

This meant that we had to copy the incomplete program to a floppy disk, copy it back from the floppy disk to the hard disk of the new computer and finally copy the completed program back onto the floppy disk. (Those of less ancient vintage will have to visit The Museum of Endangered Sounds to hear 'the strained buzzing of a floppy disk drive'.) At that time we had to type in DOS commands to achieve these tasks. Typing 'copy c: a:' meant 'copy from hard disk to floppy disk' and typing 'copy a: c:' meant 'copy from floppy disk to hard disk'. (I hope I remember the commands right.This whole post is because of getting the command wrong.)

We got the first two activities right and the incomplete program was in the hard disk of the new computer by about 11 p.m. Over the next 5 hours or so. we were hard at work dotting the i's and crossing the t's of the code. Sometime after 4 a.m., we decided that the program was functioning reasonably well and that we couldn't improve it further. All that was left  was to copy  the completed program onto the floppy. You would have thought that a couple of MBAs-to-be from WIMWI would be able to manage that, right? (In the management cases that we were given at IIMA, the protagonist was often a graduate of WIMWI - Well-known Institute of Management in Western India.)

Blame it on lack of sleep, blame it on over confidence, blame it on what you will, but we muffed it up big time. We quickly typed in 'copy a: c:' and pressed ENTER. (Note the diplomatic 'we'.) The result was obvious: the partially completed program on the floppy disk was copied onto the hard disk and the completed program on the hard disk disappeared into the ether. We didn't know about this disaster at the time and congratulated each other on a job well done.

I returned to the hostel to catch up on some sleep before classes for the day began.Something attempted, something done had earned a night's repose. Actually it was almost morning and the early birds were getting ready to hassle the hapless worms. (The old saw about the early bird just goes to show that the worm should have stayed in bed. - Heinlein) My friend had some other work and said that he will return to the hostel later.

When I woke up after a couple of hours sleep, I saw a Post-it note attached to the door with a message from my friend asking me if I could please come to his room ASAP. (Since this is a family blog, I have refrained from mentioning the friendly salutations that preceded this request which seemed to indicate that he was a trifle agitated.) I sauntered across to his room harbouring nothing more than mild curiosity.

He wasted no time in telling me the truth, the whole truth and nothing but the truth - our efforts of the night had gone waste. I think he had tried to show the program to someone and found to his horror that it was a total mess. He put two and two together and guessed that we had been prized chumps. I was like the cartoon character who runs past the edge of a cliff at full speed, keeps running for some time, suddenly looks down, finds that there is nothing beneath him and falls straight down. In the Wodehouse novel Mike and Psmith, there is a description of the teacher Mr. Downing when he is overwrought:
In all times of storm and tribulation there comes a breaking point, a point where the spirit definitely refuses to battle any longer against the slings and arrows of outrageous fortune. Mr.Dowing could not bear up against this crowning blow.  He went down beneath it.  In the language of the ring, he took the count. It was the knockout.
I similarly took the count. There followed a period of silence of the type that I have often seen writers describe as being pregnant. Then, as such disasters are usually the fault of the other guy, we appraised each other of our perception of the other's intellectual capabilities, the sort of discussion that is known in diplomatic circles as 'a frank exchange of views'.

After thus venting our frustrations, we took the only decision that was on the table: do the damn thing again. As I returned to my room,I had the expression that Sisyphus must have had when he sat at the bottom of the mountain glaring sourly at that accursed rock that he had to roll back up the slopes.

We headed back to the computer lab in the afternoon after classes. Sometime before midnight, we finished fixing the program and the moment of reckoning arrived. We carefully typed 'copy c: a:' and asked folks around to have a look. After we received the all clear, we pressed the ENTER key as if it was the proverbial nuclear button. Then we checked the floppy disk. Everything seemed to be all right. And what sighs of relief there were my countrymen!

Oscar Wilde said, "Experience is simply the name we give our mistakes." I gained so much experience writing the program that I never wrote one again. It sounds amusing now but at the time, it was anything but funny.

3 comments:

  1. Thoroughly enjoyed reading this! But Psmith would be aghast if he ever learned that you missed the 'p'..

    ReplyDelete
    Replies
    1. Gopal,

      How did that happen? Corrected. Thanks.

      Delete
  2. Had much fun reading this. I was reminded of the times I had sent disparaging smses about certain persons to the mentioned persons themselves. All the hitting 'Cancel' in the world wouldn't stop the darn thing.

    ReplyDelete