Skip to main content

Posts

Showing posts from March, 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 callin

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