April 9, 2010 § 4 Comments
Recursion is a term of some significance in any Computer Science graduate’s life. It’s one of the early initiation topics into the arcane world of computer programming. It’s basically when a function calls itself in order to do what many loops of the same code will eventually do when it exits out of a loop. It can go horribly wrong (as my computer & countless programmers will attest), resulting in endless loops of code calling itself over and over again and not stopping.
So why did I and that too all of a sudden remember Recursion? Well, my mind picked up an example of recursion when it was listening to a song the other day (only the mind, you ask? Yes, the body was doing something. Called work 😛 )
Tanha Raaton mein baatein hongi,
Un baaton mein phir raatein hongi
You see? There are raatein, in which there are baatein. Further, there are baatein which will lead to raatein. See the recursion? See? See?
Being a responsible member of
secret society of cuckoo programmers society, I’d like to make a few changes to the lyrics which will properly end the said recursion, while still maintaining its recursivity( I can make up words, its my blog!! 😛 )
execute line “tanha raaton mein baatein hongi”
execute line “un baaton mein phir raatein hongi”
execute routine again
else return 0;
You have, at this point, wasted about 3 minutes of your life on a blog post which will leave you a few brain cells shorter and with not much effective knowledge to show for it. I thank you for co-operating with me in making the internet a bit more unproductive. One post at a time.