Saturday, October 16, 2010

The Rubber Duck Method

This might be of help while debugging a code or solving a problem. :)

1) Beg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck
   (bathtub variety)
2) Place rubber duck on desk and inform it you are just going to go over
   some code with it, if that's all right.
3) Explain to the duck what you code is supposed to do, and then go into
   detail and explain things line by line
4) At some point you will tell the duck what you are doing next and then
   realise that that is not in fact what you are actually doing.  The duck
   will sit there serenely, happy in the knowledge that it has helped you
   on your way.

The perfect combination of humor and advice! 
 
Source: http://lists.ethernal.org/oldarchives/cantlug-0211/msg00174.html

Friday, October 15, 2010

Sleep, among other things

3:29 AM

Is there something wrong with the clock? I wonder, as usual. I guess I am just living in the wrong side of Earth. I am sure 80% of the people in my campus are sleeping right now. It is too late even for the students who sleep 'late' at night. It is but early morning. Just an hour or so before the early birds wake up. 3 AM is supposed to be the darkest hour before dawn. I also read somewhere that due to this reason people often refer to 3 AM as the 'devil's hour'. 4 AM is supposedly the 'brahma muhurtam', an auspicous time. People are advised to wake up (and get up) at 4 AM and pray to God. One person takes this belief even further and conducts IIT-JEE coaching classes at 4 AM sharp in the morning. Of course, he strongly believes this will make the students understand every bit of information that is taught in the class. I just sigh. Poor little kids during the height of their teenage years being woken up by alarms(when termed more appropriately parents) before 4 AM so that they are in time for the class. And ironically, this coaching centre is very popular at my hometown, ranks first in the minds of many to-be-students-and-parents-of-students-of-IITJEE-classes.

Now, for an average teenager this is perhaps a torture. But, I would gladly welcome it. My attention-span, motivation, alert-ness and energy starts rising at 1 AM and peaks at 3 AM and begins to gradually fall down around 7 AM or so. Ironically, my classes start at 8 AM :-). This isn't a new thing though. On a fateful day, I was born at 9 PM and I remember my parents telling me that I, as a child, would sleep all day and wake up bright at 9 PM when my dad and uncle come home from work and lovingly hug me. This often means sleepless nights for my mom and dad. Poor mom and dad. For no fault of theirs, they had to fight of sleep for the entire night. I hear its common for children to wake up randomly at midnight screaming, but boy, I was sweet in that I was a lot more predictable. Gradually, as my adolescence started, my parents could sleep :D. And I would be the one watching my younger brother sleep. It had become less and less difficult as I got used to it. Getting used to the late night snacks stolen from the fridge, the books(fiction and non-fiction alike) which were my best friends and my imagination. Imagination - day dreaming should be the term but I find it very inappropriate. Night dreaming? This term is useless at best. Everyone dreams at night right? Fantasy sounds better.

Much thanks to my curiosity, I gathered there is a circadian rhythm that tells the body when to sleep, eat and wake up. Mostly feedback mechanisms that sense sunlight, temperature, stress etc. I wonder if my professor of the Advanced level course on Control Systems I take should look at this. It doesn't need a controls prof to understand the controllers is running haywire. Of course, the What? and the Why? will perhaps be a lot harder to answer. Now I shall pause this stream of thoughts and get back to the the "Midnight Sun" by Stephenie Meyer...

4:15 AM

The novel's interesting. Fiction has always amazed me. Especially the fantastic and the supernatural. The cause for this indulgence is perhaps just the hope of something different, different than what the world had offered to me till now. Again it is a strange hobby for someone who feels revulsion towards the beliefs that are not proven completely. Most of the times, people find me annoying when I point out that what they believe is true is just a belief and not a fact... yet. Like belief in religion, avoiding cutting nails on the tuesdays, avoiding rahukalam while going out, turning back if you see a cat cross your path and definitely turning back if it's a black one, avoiding non-vegetarian foods on thursdays etc. The list seems endless. Some of them are downright foolish beliefs. Some of them are unproven and intricately laced with the mysterious and the unknown-

An interruption as a I glance at my notes and the things-to-do-today list. I have a class for two hours starting at 8 AM and one hour at 1 PM. Should I try to sleep again? The morning two hours should be easy if I don't sleep till then. The 1 PM class should be the harder thing to endure and more importantly to attend on time. Sleepless nights and heavy lunches spell doom to the productivity of afternoon schedules. Usually Thursdays and Fridays irritate me because of the afternoon schedules. But today should be good. I have slept for 13 hours in the last two nights. That, by experience means that I can last till the tonight. At times, I really feel like changing the 24-hour to make it 72 hours or something of that sort. Anyway, now for a little indulgence... something different.





Real Time Analytics