Tuesday, October 16, 2007

The joys of insomniac hacking.

You know you should be sleeping ,
You know you are not that young anymore ,
When you start nodding off looking at code,
And writing verse that is such a bore.

On such a note my friends
I introduce to my friend insomnia
the poor cousin of amnesia which
all the big ones said lead to being comfortably numb.

Ok enough of this bs ,
Let me actually quit this insomnia business so soon.

Saar bondaa.


It was late at night and a friend M caught me on yahoo messenger. She's sitting in the US having fun making such yummy looking bondas. Now that I had asked for some of them and this is what I got at 2:52 a.m. this morning . Ain't technology wonderful.
Person makes bondas
Broadcasts on yahoo
Requests given for bonda
Yay ! half an hour later its ready to be served. Too bad its in a continent some few thousand miles away .

Sunday, October 14, 2007

Programming Languages

Spending the weekend over at my sister's place I got a very interesting question - Hey can you teach me C++ since I need to do some programming for some of my financial derivative work - Now I particularly don't like C++ for the sheer number of concepts and sheer number of options to do the same thing in a C like dialect. Personally as a programmer I prefer the simplicity of C and on occasion have had to use shell , sed, awk to get most of my work done. Thanks to my own love of languages and never shirking from writing custom parsers and custom languages for some of my own projects either they be during my time at the university or during the course of my professional career I figured there had to be a better way than getting her senses damaged by the whole thing with segmentation faults, runtime errors, dynamic casting errors . Much easier with an interpreted language.

So I did some googleing to figure out what kind of libraries she needed and for what . I discovered that open source did have some kind of financial libraries and something available for the kind of stuff that she needed and that it had interfaces in languages simpler than C++.

The pain with programming in C / C++ for non-programmers is the steep learning curve with the whole jargon of CS, memory management - the absolute pain of looking up APIs and trying to make sense of doco that makes sense to other computer science programmers but not to programmers who want to do a bit to get their basic tasks done. Exposing APIs in simpler languages like python, ruby etc tries to improve the footprint of users and allows the users to solve the problems they want to rather than worry about other problems not specific to the problem domain. Also playing with an interpreted language rather than a translation system allows for interactivity and quick testing of functions along with development and reduces the pain of setup and attempting to do things differently.

So I am trying to now set up python so that she can get going with simple programming and free her mind off issues related to low level details. The library I am trying to use is quantlib
and see if we can get the relevant exposure in the corresponding languages. I wonder though if there could be a way of generating stuff or link this up with Excel or openoffice so that she can remain with her favourite tool. Interesting stuff for a weekend eh ...

Saturday, October 13, 2007

Kashid Trip Slideshow.

This is a slideshow of photographs taken at Kashid post the trip to do the river rafting.

Tuesday, October 02, 2007

Left Forward Right back.

Regular readers of this blog would realize that this is quite an odd title . But that's my new mantra today for existence ! Read on.

It was Gandhi Jayanthi and instead of spending time sleeping at home all day doing nothing 11 of us from office decided to do something adventurous beyond fixing compiler bugs, optimization issues, graphics issues, widget and manager worries.

Something adventurous for us was a 380 km drive across Western Maharashtra starting from

Pune -> Mulshi -> Vile -> Sajad -> Sutarvadi -

The drive is exquisite , waters in the dam are full with the copious monsoons this year and the drive through roads nestled by hills of the Sahyadris left one speechless with the beauty and the impunity with which waterfalls sprung from every place. We had a raft to catch and hence I couldn't stop and take photographs there . One should go back over the weekend just to get some cool snaps around sunset especially with those amazing waterfalls just on the road.

The Kundalika River is where we decided to do some such things in life.


So at Sajad it was decided by the powers that be , that we'd end up doing something known as white water rafting on the Kundalika river. This is one of those small rivers fed by dams in the Western Ghats and irrigating the Konkan area. However from where the water is released till the time it reaches downstream there are a number of rapids intermittently created by the flow of the water over such beautiful terran. So it is possible to raft through some of the rapids , there was 1 class 4 rapid that we had to worry about. I was however separated from the rest of the gang as we could fit only 10 people in a boat and went on another boat not so surprisingly filled with more Software Engineers. One of them seemed to be a keen ornithologist and one got to see a Golden Orion and other such exotic birds on the trip downstream .

Rafting seems to be an interesting activity as long as there is enough current to pull you through the rapids. The job of the guide / steer is the most important as he gives orders to the rest of the team - we actually had a crash course in rafting for 20 minutes prior to the actual work and amazingly self preservation has a way with people obeying orders from the guide without any questions asked and practicising with utmost seriousness because of the risks associtated with the sport. I would have usually expected some smart ass to make some wisecracks there but surprisingly the crowd in my boat was rather silent.

The rapids were in increasing order of complexity-it was too bad that I couldn't photograph any of it - there was only space in my hands for a T grip on the paddle and nothing much else. The rowing commands while in a raft seem to actually be pretty simple - Forward , Back, Get Down (Means get into the raft! and not into the water ) and Stop. Pretty efficient state machine if you ask me - however it has interesting combinations like Right Forward and Left Back which means paddlers on the right side of the raft row forward and those on the left row Back. There's a technique to rowing - but its so tiring in still water that one gets really hit with the lack of exercise that epitomizes every software engineer's life.

There was one class 4 rapid John Cary as our guide called it - In all we had the following rapids

  • Laughing Buddha - The easiest of the lot, we got our real life training sessions here for implicit obedience to the guide.
  • Pumphouse - Little more complex - was a series of class 2 rapids , pretty simple in comparison to some of the others but after the serenity of Buddha was an interesting and long drawn affair.
  • Morning Headache - It should be renamed to Monday Morning Headache - This was a class 3 rapid that was also managed pretty well. All the while the guide was taking us into the rapids in the best possible way and giving everyone a fair and thorough drenching.
  • John Cary - A class 4 rapid. The only place where we had to "Get Down" . Get Down in rafting is to get into a defensive position holding a line that runs around the raft and brace for life and hope that you don't get thrown off. This was v. interesting . There were a number of times when one thought that you'd get hit .
  • Rajdhani Express - Am not sure of the class of this rapid though one thought it would be a class 4 rapid. This was long and drawn , the last one but pretty fast and long like the Rajdhani Express.

The rapids got covered in about 30 minutes of the whole trip down though the remaining time was spent in just floating through with the current till we reached a point downstream where people could swim pretty safely. Yours truly was reminded of a certain incident regarding swimming in the Mulshi Dam where there was a rebirth - so i kept my counsel and decided against getting into the water for a long time. The will was finally broken by the sight of friends of mine who'd never swam before in life swimming merrily in the water and I jumped in promptly to disappear under water for a couple of seconds. I surfaced but it felt as though it was time to call for the lawyer, bequeath my car to my parents, wonder about my tax refunds . Just when one wondered if this was it - the end one realized that he could breathe and got in a few scoops of Oxygen instead of water . This was when the fireworks display inside my head started reducing - and I was able to vaguely make out shapes on what we call Planet Earth. Things got even better, the sun was shining merrily, folks were enjoying their lazy swim in the river , the birds were flying , the vultures disappearing when a pair of hands actually pulled me up using the 2 straps of my life jacket. I didn't know that these things were so strong and pretty well maintained and got back up. I also realized that K my cubicle neighbour wanted to get back at me for all her troubles I had previously caused her in life, by pushing me into the water. Give me land and I am good , push me into water and I am worse than a baby.

In any case after this got done one got to participate in a mini regatta for a couple of kms involving 4 boats. After a spirited race where the left side paddlers in my boat decided not to row in sync with the folks on the right side, we caught up with the leaders who incidentally were my office mates in the other boat. We did give them a tough fight, though ingenious last minute matchfixing by yours truly let us reach second to the final destination.

P.S. This doesn't end here, what's not mentioned is a 1 km climb up a hill with sore legs and hands , resolves of more visits to a gym and the badminton court.

Nasik Triambak Shirdi Bombay Shani Shinganapur Panchvati

3 cheers for the roads and the beauty of Western Maharashtra. If anyone would have told me that I could do this in 1 weekend with hardly any effort I wouldn't have believed them . The fact of the matter though is that I've managed to in one fell swoop cover stretches of Western Maharashtra that have been on my wish list for ages now. Its my 9th year in Pune and only now have I managed the trip to Nasik .

Nasik is about 200 km from Pune and boasts of the origin of one of India's mightiest rivers, the Godavari. It derives its name from the Sanskrit word Nasika which means nose. Legend has it that this is close to Panchvati where the nose of Surpanakha the sister of Ravana in the Ramayana had her nose cut by Lakshman . The Godavari or the Ganga Godavari as it is known here flows in a merry stream maintained rather well by the Nasik civic authorities. However I wonder what would happen in Jan or feb when the monsoon rains would have stopped and the dams would no longer remain so full.

The places to visit in Nasik are Panchvati, kala Ram Mandir, Seeta Gupha, Triambak, Godavari Khund. if you are a pilgrimage fanatic then this be the place.

The Seeta Gupha is among the most interesting places to visit. Psychologically this is the place where you realize how much thinner you need to become and the dangers of that last piece of dessert and that one last ice-cream and that one small spoon of sugar in your coffee. Now for the literal story - its a small little cave with idols of Ram, Lakshman and Sita but the approach to it is so small that only one person can enter and that too on their knees or on their haunches. You literally crawl down have your darshan and get back up in a similar undignified position. Thankfully I had a friend to push me down in case one got stuck but then he just had 2 small school going kids who'd have had struggled to pay him the same compliment.


Anyways the story ends with me not having to be pushed out of the cave and making it back safe and sound to write this one.