Wednesday, December 31, 2008

The Cooking Codes.

Without much ado, i jump into the topic... Sometimes Cooking and coding seem to be greatly similar. 


Both of them have Methods, called recipes in one case and algorithms in the other.

Both have parameters to be tuned, an input to be given, and a precise output that is expected.

In both cases, partial output is totally worthless.

There is a huge huge gap between the method conceived and its implementation.

Both require utmost concentration for a novice, and though sometimes they can be automated, the resultant product is not always the one desired.


Both have to be learnt with practice. The experts can never "teach" how to do it. Usually, both are done by trial and error in the beginning stages.

Both can be 'learnt' in a matter of days, but take years to master!

The superficial similarities are not the only ones.

Both can be outsourced, although it does cost a lot to do so. Neither of these is learnt unless (1)there is a life-threatening emergency to do so. or (2) if it turns out to be a passion for him/her.

Both are absolutely drab and a waste of time to some people whilst some others consider it an exalted form of art , a medium of ultimate sophisticated self expression.

The bosses always want the result, and are not concerned about how difficult it was to get it done.

The number of books abound for both, but the quality does not necessarily improve by the reading of books.

Its extremely trivial to make errors in either, and once the errors are made, its very very very difficult to find and correct.

Both have their time and space complexities, and that cant always be estimated beforehand.

Discoveries of new recipies/hacks are mostly done by lucky accidents.

Each has its beauty, a subtle indication of the fine precision and skill that has been chiselled into it. This is often only pursued by the people who have the 'taste' for such things. For others, one recipe seems as lifeless and boring as the others.

In both these skills, if the heart is not in the job it is very difficult to accomplish much and the time and money spent does not always add up to the quality.

"Too many cooks spoil the broth" holds true in both the domains.

Both skills turn to be life critical at times, and become vulnerable to Murphy's laws too, and precisely at that time.

Lastly, there is always scope for improvement in both!

Oh, somethings missing.... Ah .. A moral ... So here it goes ...

So, the next time your grand mother asks you a doubt in computers, do not be arrogant. She would be a better coder than you, if only she plunged into the domain. She already knows the tricks of the trade. [:P] Oh, i forgot , the reverse does not always hold true.

PS : Sorry for making you read this mokkai.

Monday, December 1, 2008

At Home...


Once upon a time, when this title could not be abbreviated to ~ or a bunch of HTML  ; when it still referred to a place one need not wear any masks, there lived a 9-year old boy called Karthik.

 He loved his home, quite understandibly, and more so during holidays. He waited all year for his summer holidays and now that they were here, he was totally overjoyed. On the very first day, he asked his father to wake him up at 5:45 am, astonishing him. After all, one could not afford to lose holidays sleeping, much unlike the schooldays wherein he had to be dragged out of sleep. 

His father was punctual, and he did get up, brushed his teeth and put on the TV and computer together. Multitasking was not just in the domain of Computers. His elder sister woke up slowly, and was shocked to see him awake. In fact, he had seriously considered putting off the fan, and pouring some water over his sister's head as she slept, but decided against it. Not that he was afraid of her; it was just that it was against his principles to attack an unarmed person. 

His sister smiled at him encouragingly and sat near him with the tumbler of coffee as he played Age of Empires ( without cheatcodes) . He tightened his hold on the mouse. He certainly was not going to give her the computer to program/watch movies. She smiled again and appreciated his strategies. He started worrying now.  He told her clearly that he would not relinquish the hold on the computer, and if she put a password there in his absence ( as he clearly suspected ), she would have to face dire consequences. She was annoyed, and left the place. He liked it that way. 

At 12:00 noon, as he had conquered most of the world, his mother, for the 28th time, ordered him to go to bath. He decided that he must have some rest too. He collected his accessories - that included 3 GI-Joes , Chess coins, 2 paper boats, and a bouncing ball and went to bath. 

He planned his naval strategies meticulously on the water in the bucket, with the very simulation of a naval battle that he was soon going to launch. In the midst, somethings caught his attention. He was amazed how the color of water changed from White to Colorless; why the water from the tap took a cylindrical shape( even after coming out). He came back and as he gulped his food, he asked his doubts to his sister. His sister did not bother to even look up from the thick book she was reading. 

Seething with anger, he wondered what they learnt in higher classes. He then watched back-to-back movies of Harry Potter on Pogo.  In the evening, he was ordered by his mother to write the Tables.  He did not understand why he had to write it when the calculator could do it in an instant. "Because the calculator is not allowed in an Exam" , came the reply.  " Why?". "Because they want you to learn tables." He was certainly not impressed with the circular reasoning.  He strongly felt that he would reform the educational system when he grew up.

Grudgingly, he wrote all the tables from 3 to 14, even as he saw his sister doing some programming on the computer. Curious, he asked her what it was. She explained that it was a complicated sort algorithm. He was aghast. They did the questions like " Arrange the following in increasing order " in the 2nd Std and his sister was still stuck on that. He thought AOE was much better than spending 2 hours to write a program to arrange 5 numbers in an increasing order. Nevertheless, his sister did not appreciate his comments, quite expectedly. 

Once he got bored of AOE, he went back to his mother pestering her to make sweets that day(since it marked the commencement of his holidays) . Sitting on the cool balcony with his mother, gazing at the endless stars and the drifting clouds lit brightly with the moonlight,  he wondered what he had done that day. Nothing, came the honest reply from his heart. He persisted. He asked himself if anything he could do would have made a difference to this infinite cosmos? He went further and wondered if anything anyone  could do would make a difference to it. The answer was still negative. " Why then do the adults spend all their time in worry and complaints when none of their actions are actually of no great consequence? " He would soon understand, or quit the attempt to understand as people all around him had done... For the time being, he kept contemplating...