Pages

Wednesday, March 26, 2008

Kelaniya Flyover Opening and the Fun We Had in Traffic

7:10 am -> office van still not in the vicinity. Traffic in Kandy road even near the campus.

7:15 am -> van still missing. Start to have a panic attack. Did I get left behind?

7:16 am -> call buddy at van. Van still on the way. Blood pressure back to normal.

7:20 am -> van approaches.

7.30 am -> van turns from Kandy road on to a narrow and even more trafficky alternate route

7.40 am -> van is following a huge line of other vehicles which crawl at snail pace. Still in Kelaniya.

7.50 am -> van (along with other vehicles in the line) stops, kills the engine and waits. Occupants of the aforementioned van start to bake in the hot March sun. Still in Kelaniya.

8.00 am -> Occupants experience severe stomach pains aka hunger. Several people get out and buy bananas and bread from a petti kade and have their breakfast by the road side with the magnificent view of huge line of vehicles as scenery.
Still in Kelaniya.

8.10 am -> Some responsible people in van start calling their offices to inform they are having fun in traffic and will therefore will be late. I dont have my boss' or any member of my new team's mobiles so I decide to be irresponsible.
Still at Kelaniya.

8.15 am -> Feel guilty about not calling anyone so call mummy dear to complain about traffic.
Still at Kelaniya.

8.20 am -> Gloat over a 138 tata bus stuck while reversing. Still at Kelaniya.

8.25 am -> Traffic slowly start to inch forwards. Occupants of van feel very sad because they sense Day Out in Traffic is about to end.

9.10 am -> Arrive at office. Am 1hr 10 minutes late.

Tuesday, March 4, 2008

Randomness Vs Cause and Effect

One of the lessons I have learned while bug fixing is that there is no such thing as Random events in a computer program. A computer program is, when you think about it - very boring. I mean it has several hundreds or thousands (depending on the program size) of rules laid out, and it behaves in a preordained manner - well at least in theory!
This is the golden rule to remember when you're debugging a seemingly unpredictable program which seemingly crashes in random situations. It is not that its behaving randomly: rather its just that you're not seeing the pattern. Sometimes its like those weird pictures that have crazy lines and shapes that make no sense what so ever, but if you stare at it for a while you see a pattern emerging and voila! there's a picture of a sad woman gazing at you ( hmm i wonder why its always a sad woman).
I mean a computer cant even generate a random number for gods sake. How can it behave randomly?! I can recall several hilarious moments when the code seemed to give particularly bizzare behavior. If you didnt know better you'd say the damned thing was playing tricks on you.
Like for example when all the Save buttons disappeared in everyones app. And this when no one had checked in any new code! Another time i was debugging a server and a loop appeared to have gone off its rocker. The loop invariant was fine and yet the debugger wouldn't go inside the loop! And then it would repeat several lines outside the loop! Hah silly me. I had deployed a different server whose source was different than the source i was debugging.
So i guess the lesson is that every bug has a cause...and Randomness is a human trait...no wait. Randomness occurs in nature doesn't it? And what about reality? If it comes to that what are true random events anyway? Like when you really like this guy and you suddenly bump into him on the elevator? (Well maybe that wasnt quite so random after all...who knows? )
To the best of my knowledge, Randomness can be mathematically measured but not proven. And what about Organized Chaos? I am constantly striving to explain to my mother this particular concept. My room may be a mess Amma, but I know where everything is. So its an organized mess!