Saturday, August 25, 2007

first failure @ C-DAC

I believe that failures must be cherished to remind us, “To error is human”, and we can't get over this hard reality, but if we are careful and have understanding of our previous mistakes we can minimize the space where we can go wrong. In 2nd MGPA of FPGDST, I failed, and the postmortem session organized by the faculties was not good for me, so I decided to do it, myself and right here.
When I came here, there was so much hype about MGPA/ MGPT and its toughness, and in my first MGPA I was so cautious about the problem, that I read the problem statement 4 times. The problem was so simple for me that, I was trying to find some hidden points which may result in havoc, but the problem statement was clear, nothing to worry about but I went beyond the problem statement to overcome any critical situation, because I knew if the problem statement is as simple as written, I can code on the computer just in 5 minutes. Wrote the code on the paper by extending the problem base on my own assumptions. But coded it as stated in the problem, on the computer just to check if the problem can go beyond the statement. And success in the very first attempt, around in 5-10 minuets, the problem was as simple as stated.
The second MGPA, again problem looked simple to me as earlier, but this time I was so relaxed that I did not read the whole problem nor I had any look at second test case...I didn't understand the problem at all. Coded it like simple Queue, executed the first test case, success...so submitted it to PARIKSHAK got just 2 Y's, thought there must be some simple logic or code mistake and start wasting my limited time in casual debugging.
After wasting enough time, I just thought to execute the pathetic 2nd test case given in the paper, test case failed, so I'm close to the problem, I thought, how pathetic I was!!! Again debugging but no success, now I took the serious step to analyze the 2nd test case, and I found that the problem can't be solved by simple Queue, Shuffling Queue or Circular Queue is the right solution, still have 15 minutes, I still can do it...
in ten minutes or less I completed it 2nd test case was successful, submitted to PARIKSHAK no success.
Now there was problem with the 1st test case, by now I had lost faith in me( in my logics), start checking the logic, but there was not any problem in the logic..how can I find that. “Time Over” message from the PARIKSHAK, lost the battle...LOSER....
But later, I went to lab to find out the problem, I just forget to put braces after else condition containing three statements, I figured it out just within 3 minutes, but it was too late...
I used to write complex and compact code so that it would require it's due mental exercise each time I go through it, never put braces if loops or conditions execute a single statement. In simple Queue implementation in else block of Enqueue operation had single statement but when I modified it to Circular queue there were three statement in that block, but braces were missing...
I failed to handle the situations, just because my prejudices made me blind to observe minute points, leading to series of silly mistakes and finally, I lost the battle even working hard for an hour, which I could have finished in just 20 minutes.

No comments: