Friday, September 30, 2005

All's well that ends well

It was the State level Software Development Competition at the famous BITM (Birla Institute of Technology Museum) that had the most notable schools of West Bengal participating. The schools that have secured the top two positions in the District Level have qualified for this event, which to eleventh standards like me and my classmates, coming from a school which was then not very well known, was a big achievement.

It was well past two o'clock in the afternoon and we were all tensed. There was hardly any time left for us to complete the assignment at hand. Rahoul was swearing under his breath and Koushik with his chronic Halitosis was also breathing very heavily behind me. I felt sick. The program was far from perfect and I could not type on because of my nervousness that was compounded by the foul-breath from behind me. I have always believed that creative work could only be done in an environment where there was no physical discomfort. But that day I had serious troubles and no backup to fall back upon. My mind raced back to the days when we were in the district level competition…
***

There were about 15 schools from Kolkata (Calcutta back then) who had been in the competition in the District Level. We came out second for the educational software named “Solar System”, created with the language GWBASIC 3.22 in a MS DOS 6.0 OS. It was, I admit, a wonderful piece of code that took almost 2 months to set up in school. That particular year 1996/97, allowed the participant schools to bring in their own PCs. As many as 3 schools got disqualified for unethical practices of bringing the code along with them on their PCs. The competition called the participants to be present in a large hall 3 hours a day and write a code impromptu that will have some bearing on the users in the form of information, within a time frame of three days. The topic was to be of our own choice. Nine hours in all… and everyone knew that the toppers would have to do more than coding within that time frame to present such beautiful streaming graphics and animation. So it was an open challenge for us to have secured a place among the toppers.

I have certain reservations for a lazy person… I seem to understand them better than most of us. I knew from my long association with Koushik that he was lazy by nature. “There is a saying that I believe wholeheartedly in”, he would say… “If you cannot do a piece of work yourself then get it done by a lazy person… He will not only do the work in a shortest possible time but also do it the best”. Intelligent and lazy, that was how Koushik was and made up for his laziness with his intelligence; he would always figure out some way to do a work and minimize the actual workload without being non-co-operative. So, while everyone tried smuggling in the source-code, a few succeeded and a few unfortunate got caught and disqualified, He did not bother to take the trouble of smuggling it in. He suggested to the group what was not only a better plan but the most cunning of all schemes in which I ever had a part to play.

We knew that we would be using the machines from our school itself. So, according to the plan, one fine morning about two weeks prior to the competition I sat on the machine scheduled to be into the competition, a 486 DX with a monochrome VGA monitor that could only produce the shades of gray other than black or white, and copied the code, that was developed on a Pentium S color PC, onto its hard-drive. I then invoked the Undelete application and set up the undelete directory. Finally, when that was done, I simply deleted the code from the machine and shut it down. This was of course, not noticed by anyone other than the three of us. I admit we were fools to have taken such a great risk. If we were caught in the act of cheating in a competition so important, we knew, the school would take severe actions to make amends. But I guess wisdom of such eventuality was sincerely absent …

The day the competition started, I was nervous but confident that we have taken the best precaution among the others and we were overjoyed when the machine was cleared without a hitch. It was then just a matter of time before we invoked the undelete command to retrieve the whole of the source code at our leisure. Strangely, it was only then that we realized that most of the participants were sitting idle and chatting away their precious quota of time allotted for the competition.

At the end of the third hour on the first day the judges came by to review the day’s work… By that time we had successfully undeleted the whole of the source code and had taken it apart into three segments. We showed the judges the menu and the small things that were there in the first segment…

On the third day like all other participants we submitted the code and waited with hopes mounting that we would see though the competition.
The Solar System application was a good one with vivid graphics and loads of animation. It even had a quiz session at the end. It got evaluated on a PC with color monitor and therefore the effects were just superb. But there were others too with animations much better than us and with presentations much colorful than us. There were in all 11 schools that finished the competition and among them we had to seriously lucky.

When the names of the runners up were declared it was a relief that we had seen through the initial phase of the competition. What awaited us, we were not sure but it felt good to have come out victorious when the battle itself was so unethical. La Marts took away the first prize. La Mart boys made a virtual physics laboratory complete with a robot guide and unparallel animation. I wonder how they could have fooled the judges into believing that it could be done within nine hours.

We, of course, had no problems explaining how we had made it possible to have done what we had done. We had designed an Editor that could enable someone to draw pictures very easily and save them on the disk. When required the Program could also load the picture in no time. In reality we took the whole of the three days to have developed the editor itself. We did that to avoid any suspicion and presented the onlookers with a picture of a team working with sheer dedication. The judges were so impressed they made the editor and the loader available as standard tools for the successive years to come.

That was one victory I never enjoyed much except for the fact that the application was very well written to have passed such tough (sic) competition… Partially, because I knew where we stood had there been a fair competition… we would probably had not done bad after all but, the quality of the work would not have been close to 10% of what we had been able to present to the judges through deceit. A small detail seemed to have been overlooked by the judges when they had evaluated our work was the fact that, the machine on which we had developed the application had a monochrome monitor, yet the colors used for the animation and graphics were just perfect!!!
***

But that was in the district level… and presently, my mind focused back on the program that lay listed on the screen in front of me. Rahoul’s nudge in my ribs had brought me back to the reality that we are now at the state level competitions and that: we have lots of fine tuning to do before we submit the code for the adjudication at 4 o’clock. Back in the district level we had the savior in Peter Norton (who had once accidentally deleted one of his important documents only to realize that it was not possible to get it back. He then wrote the Undelete.exe, which happened to have been bundled with the MS DOS OS, after its importance got acknowledged), but now we were in the open and had no cover… for the state level competitions required that a topic be given on the spot on the first day; so, no more prewritten code. The time limit however was 25 hours i.e., 5 days of 5 hours each.

I looked over to the left, where the La Marts boys were working, and I could easily make out the stress they were in. They were huddled together and almost having arguments every now and then. It was then I wished we had a fair fight in the first round. The topics for the state level were varied. Every topic like Mathematics, Physics, Biology, Chemistry and Geography were covered: Probability, Projectile Motion, Photosynthesis, Periodic Table and Atomic Structure and Water Cycle respectively. I looked around to see the other participants and there was a general state of buzzing all around. I could make out the outline of a leaf on a screen some distance away… Photosynthesis, yes that is what they were attempting… One of the members of that team in question noticed that I was taking some interest in their work and they promptly switched their monitor off to face me. I hurriedly looked away and almost laughed out loud. They were probably unaware that we were attempting the Projectile Motion but the competition had brought the meanest of mentalities out, as does the war.

It was some school from Nadia and I was not interested. Meanwhile, Koushik had replaced me on the keyboards and was frantically searching the code for the defects. We managed to demonstrate the projectile motion with the examples of shells being fired from tanks or bombs being dropped from the planes and that sort of things, all done in animation. The editor was there and we had created some wonderful pictures of planes and tanks. There was another trump card up the sleeve for us, we had been able to develop an interactive screen where the user could give the speed and the angle of the projectile being fired and the program would trace out the path of the projectile and show it to the user through animation. The usual calculations like the height achieved and the distance traveled would also be shown along the graph that was traced. It was the salient feature of the program other than the graphical design and the animations.

However, there were a few problems. The tank seemed to fire from its body and any amount of tweaking, on that section of the code to correct its fire from the muzzle, was futile. The things seemed to worsen when we tried to correct it and the shell started off either from thin air or from the ground before the tank. The only positive thing about that code in that present state was: the shell started from the body of the tank and grazed the muzzle. The observer had to be absolutely focused to realize that the tank was firing from the body and not from the muzzle. The plane dropping the bomb was relatively trouble free, except if someone looked very attentively it would have been discovered that the motion was a quarter circular one and not parabolic at all. The trump card that we had up our sleeve also had some share of that erratic behavior and the projectile seemed to have itself detached from the origin (0,0) and start from somewhere beyond (20,20) as the angle increased beyond 60 degrees. The greater the angle the greater was the movement. The reason was not clear; and in spite of having gone over these sections of code a hundred times, we could not identify the reason of the strange behavior.

While time passed by, much too quickly to our comfort, we failed to correct the problem. It dawned upon us that we might as well have to make up for the flaws during the evaluation presentation. I suggested that we might avoid a little embarrassment if we limited the projectile angle to be less than 60 degrees. Accordingly, the screen was altered and a message was displayed indicating to the user to avoid giving angles greater than 60 degrees as inputs. We also validated the input so that if a user entered angle greater than 60 degrees the program would not accept the value.

Just when it was about time we gave up and with one final run of the whole code we submitted our work for the adjudication. At the appointed hour the participants were told to stop and as usual like the last minute revision during an examination the buzzing went on to humming and then to chaos.

We watched and from the sighs of my companions I could make out exactly what they might be thinking. After all we were in the same league. We all felt very skeptical. La Mart boys were not looking very confident either and they had a serious altercation with the authorities, which looked like they demanded a 5 minute slack, but was eventually denied. Finally, when the collection was over we gathered in an adjoining hall and waited for our turns to be summoned to the judges… where we were to display the application and give a short presentation. I was lost in my thoughts from the previous level where we went in, confident of our code’s performance; now, it was free for all. The participants from other districts were bubbling with confidence and I particularly noticed the Nadia School team, who had their monitors shut, looking extremely confident with their work. Now if anything could save us from a disaster, it had to be the presentation itself.

Rahoul was a confident speaker and we decided that he would be doing the presentation, Koushik would operate on the keyboard (just the job for him) and I would try and create a distraction when required, especially when the tank and the plane came to the display. It was also decided that I would take over if anything falls apart during the presentation. With our hearts pounding at the prospect of bluffing the judges, we waited.

Our turn came second as we had submitted the work second to another team. With genuine uncertainty we walked into the familiar room where the judges sat near a computer. We exchanged glances and a general reassurance through it and began our presentation. Koushik was very nervous and he almost hurried off through the tank sequence where, to our dismay, the color of the tank appeared florescent green!! To add fuel to the fire the judges were very interested to know why such a strange color had been used. We had to go back to the tank sequence and I sprung into action… very carefully shielding the point from where the shell came off the tank, I put my finger on the screen, to let the judges see only the muzzle portion of the tank. Once the shell had passed grazing the muzzle, I relaxed and explained that we had been using a monochrome monitor to develop the application. Luckily for us, the presentation of our previous application had left some amount of sympathy amongst the judges; they immediately waived it aside as a problem. One of the judges even commented that it was like a camouflage!! Imagine a florescent tank in a real battlefield; it would be a treat for the enemy to sight and destroy it. It is, I admit, the worst suggestion that I have personally come across… worse than the ones I had talked about in my previous article…

The plane proved to be another hurdle. To our dismay, it was of a bright blue color… nothing much was said about that anomaly for the overall effect, with the animation taking the brunt of attention away, was satisfying. Finally, came the “Ace up the sleeve” and the very first question that a certain judge, Prof. Curie (or Koory from the St Xavier College Calcutta), who was a lecturer of physics, asked was why the projectile could not be fired above the 60 degree angle. The answer to this fell in my responsibility and I could not think of anything better than to say “Sir, it is actually a limitation of the GWBASIC language. It cannot process angles greater than 60 degrees… moreover Sir, if someone had indeed fired at an angle more than 60 degrees it would be the same as that fired with angles less than 30 degrees… ”. By the time I had finished that wild explanation, I could see Koushik look towards his shoes with a sudden interest and Rahoul struggling to suppress a giggle. There was a pause.

The idea to have the judges taken for a ride, suddenly, seemed too foolish. I was certain; that the bluff would disqualify us…. Then with a sudden change of atmosphere the whole of the room seemed to have acknowledged and endorsed what I had explained and we were told to carry on with our presentation. I could not believe my ears! I would have jumped up in joy and would have hugged Rahoul and Koushik (in spite of his overpowering Halitosis) had it not been for the situation we were in. The rest of the presentation was just like a piece of cake and we emerged with a ray of hope to secure at the least a consolation prize.

The final hour of the declaration of the winner came close and it was almost 7:30 in the winter evening of January when the prize announcement started. We were never expected to reach the State Levels so there was hardly any support for us from school; but our computer teacher from school had come for the announcement ceremony. Not that he was expecting too much, but was hoping against hope. We were miserable because of his presence and for the certainty of the realization that we would come back empty handed.

Like all the other prize distribution and announcements the consolation prizes were announced one by one, starting from the least important and progressing towards the more important ones. At every announcement we strained to hear our names but every time we were disappointed. It was concluded after a round of quick self assessment that we cannot expect to be among the top three and when all the prizes had been given off in the consolation prize category… we resigned to our fate and started conniving of an explanation, that could act as an excuse as to why we performed so poorly.

La Marts had bagged the third place. I felt almost jealous although for no particular reason when I saw the rivals from Calcutta mount the stage and accept the prizes with smiles, which extended up to their ears. I watched them come back with their winnings and take the seat in a row ahead of us and felt a twang of guilt to have felt jealous. We eyed their prizes were looking at each other with smiles of resignation when the Nadia team took the stage and claimed the second prize. I felt like a miserable person and all my cheating from the previous level seemed to haunt me… I did not notice the jump of our computer sir. I also did not hear the shriek from Rahoul when the announcement for the first place was made. I was too deep in my misery to have understood the reason of rejoice of Rahoul and Koushik when the realization dawned:
We have WON!

I still remember that I had joined my team and walked up to the stage while the whole of the hall clapped and cheered. I turned to look at the La Mart boys with a smile of the victorious as if to convey the point home that we can as well beat them fairly… even they were clapping! I forgave them instantly (although readers may ask why I actually though about forgiveness when nothing wrong was done…the answer is …I don’t know too. But forgiving them seemed most logical and so I did).

While I received the Silver Medal and the Certificate of recognition many scattered thoughts raced through my mind… The uncertainty and the cold sweat when I pulled off the finest bluff of my small and eventful life, the long and tedious hours of typing and debugging, the tension and the anxiety of being caught in the act of wrongdoing all came back… but strangely they did not touch me and I felt a wave of relief and achievement flood my senses. I remembered the saying “All’s well that ends well”…

1 comment:

indranil said...

Oirpus

I must say that it is pretty difficult to criticize unbiasedly when you know that you have a known face at the opposite end of the music. But one thing I must agree to which is - you have a very good sense of humor and the best thing about this is that you can as well express it in your writings. To be very honest I liked you Proposal more than All's Well coz the former one was written really in great satirical style. It is always being said by the gurus of entertainment that to entertain others you have to first entertain yourself. I do believe that you must have felt more entertained while writing the Proposal one. Don't get me wrong here please. The All's Well one is a great effort as well. But for me the genre in which Proposal belongs to is THE GENRE for you.