Back in college, I knew this fellow called Dabhishek. What he was doing in an engineering course was beyond me, and in many ways it was beyond him too. He was very absent minded, but equally determined to get through Engineering, even though I suspect he didn’t really care so much about computer science.

The universe seemed to be conspiring against him, but he always found a way out. During the first exam, he forgot his hall ticket, during the next engineering-drawing exam, he forgot the drawing board and for the third exam he forgot to bring a pen. But each time he successfully managed to figure out a way and came out unscathed. He had real brains!

During our first year, we were studying the “C” programming language and we needed to write actual programs during our exams. But whatever he did, poor Dabhisekh just couldn’t figure out just how to write the programs. He felt safer with the theory, because you can write something… anything… in a theory exam, but when the question demanded a program, he just couldn’t figure it out. As usual, he used his genius to figure out a solution to this problem - He began memorizing programs like 8th standard poems.

if j equals getTotalRecords open bracket
x equals j multiplied by number of packet
if x equals equals boolean of prolon
return total plus x semi-colon

Dabisekh also had a backup plan to make sure he scored well in these tests. Right after the exam ended, he stopped eating, and for the whole week didn’t eat anything. By the time the prof was ready with the corrected answer sheets, he had lost 4 Kgs and looked seriously ill. This evoked great feelings of sympathy with the prof, and this sympathy was very valuable during the marks negotiations phase. He was a very very successful negotiator too. Always managed to be on the top of the class.

All the semester went fine and dandy for Dabisekh until the practical exams. This was particularly problematic, because we were expected to actually write the program live on the computer in front of the examiner, and then demonstrate its working. The day of the practical exam came, but Dabisekh didn’t seem to be nervous at all -  not even a little bit. Only one of two things could have happened - Either he had learnt all of “C” programming overnight, or, more likely, had figured out a master plan that would get him through the exam.

The exam started, and Dabisekh got his question: Write a recursive program that will calculate the factorial of a given number. Dabhisekh was sitting on the computer right next to me, and he got to work immediately. He started typing furiously, and, more shockingly, he was not just playing pac-man on the comp, but actually typing the program in! In record time, he was done, and called for the examiner to his workstation. Had he been able to figure out the program faster than anyone else?

The examiner came over and sat by his desk. Dabisekh quickly described the problem and went into a philosophical discussion of “recursion vs iteration” in the manner of a well practiced speech. After the examiner was sufficiently impressed, he ran the program and said “The program is now running and we will now enter a number into the program and it will print out the factorial. Lets pick a number to enter… some random number… maybe 5. Lets input “5″ to the program and …. volia! It prints the answer as 120, which is exactly equal to 5 factorial.”

The examiner was nodding and clearly impressed with his skillful presentation. Dabisekh thanked the examiner and picked up his belongings and left the lab, the first one to finish his program. The rest of the batch was also duly impressed.

But I just couldn’t help wonder how he had managed to get his program done so fast. I peeped over to see his program on his workstation. And there it was:

#include <stdio.h>
...
... 100 lines of code that looks like its doing something...
....
printf(”The number you entered is 5 and its factorial is = 120″);

… 100 more lines of code that looks like its doing something…

Holy Crap! He had hardcoded the input and the answer, and had cleverly managed to convince the examiner that he was entering a random number, when, in fact, the program was printing a predetermined answer! What a brilliant idea!

Dabisekh found his true calling right after college. He earned an MBA from IIM Ahemedabad and is now selling luxury Villas to unsuspecting folks in Bangalore.