Wednesday, April 23, 2008

Stuck in a Time Frame

The topic of some mutual friends came up during a recent conversation I had with a friend. After I filled her in about their whereabouts and activities she remarked that said friends and yours truly were "stuck in a time frame". I understood what she meant in the context of our conversation. I realised that she had merely expressed in a catchy phrase an opinion others had expressed before using different words. In order to fully understand the import of 'stuck in a time frame' I will first try to illustrate its opposite concept. 'Moving through time frames', if you will.

The basis of my explanation is my understanding that the (suburban, educated) Indian society expects individuals to live their life in a certain way based on their age "time frame". In Kerala the teen years are considered to be the time for education. You are expected to be in college by your late teens. Some of the non-curricular pursuits of a typical student include dabbling in new hobbies and other activities. These are mostly but not always tolerated. For instance I picked up Miniature Wargaming as a hobby in college. I hasten to add that individuals are expected to outgrow their hobbies or interests as they move on to the next stage in life.

For my generation a person's twenties is the time for seeking gainful employment, sometimes after completing higher studies. As travelling overseas became more common and affordable people were expected to switch to "explore" mode after landing a job. Non-curricular activities of this time frame include visiting various places, picking up hobbies that are made more affordable by technology etc. Most notable among the latter is Photography. Of course there are people I know who used to save their allowances to make money for Photography while in college but that is another story.

Mid to late twenties, as I was told by more than one person, is the time to move on again. Marriage is *the* key social event marking the end of this time frame. This is such a strong social expectation that unmarried people are treated almost as if they are in mortal danger and pose a threat to others. It is common for bachelors and spinsters to be asked even by virtual strangers why they haven't married. Marriage itself is the outcome of a filtration process demanded by society and community and initiated by parents. Criteria of filtration include religion, caste, community, state, and language to mention a few. A list of desirables passing the filter conditions is presented to the "end user" and he or she can pick any one. There indeed are exceptions but these remain a very small minority.

A man in his thirties is expected to start a family and "engage society more actively". "Engaging society" means, among other things, actively participating in social events that you were given permission to avoid as a twenty-something. Hobbies are frowned upon unless they are strictly mainstream. Non work related pursuits are allowed as long as they are for buying a new car, apartment or real estate.

I don't know quite clearly what my generation is expected to do in our forties, fifties and subsequent decades. I speculate that our forties would be the time to focus on children and career growth punctuated by the occasional mid life crisis. The fifties would be time to coordinate marriages of children born to the Indian software generation.

It is interesting to note how a bit of this progression is reflected in the photo galleries of a social networking site popular with Indians. First, snaps of the protagonist in various places around the globe. Some capture their first car or apartment. Marriage photos and pictures of the sweetheart appear some time later. These are in turn replaced by pictures of children and group photographs.

Coming back to my conversation I found that my friend's opinion was apparently based on her observations of the individuals' lives. None of the people we discussed including yours truly had "moved on" as she expected. At least two in the list are pursuing higher studies in their thirties, that too in subjects not necessarily related to their present careers. Three are not married and don't plan to. Not to mention their hobbies. I counted several different hobbies in the group ranging from dancing to miniature wargaming to semi-professional poker to playing the Mridangam.

I told my friend that all the people we discussed had merely chosen to define the (time) segments making up their life differently. I was not convinced by her arguments that one should drastically change his outlook on life for the sole purpose of meeting popular definitions of "moving on". As far as I see each one of these people *have* been moving on. They are more skilled, know more about their favourite subjects now than they did five years ago and are by no means staying still in any of their chosen fields of endeavour. If anything almost all of them rue that they are not moving forward as fast as they would like to.

Friday, April 18, 2008

A Tale of Two Movies

The acclaimed Malayalam movie 'Paithrikam' came out in 1993, the year I finished school. Directed by Jayaraj the movie told the story of two generations of a Kerala Brahmin family. The father is a soft spoken orthodox Brahmin well respected in the community and a learned scholar-performer of rituals and Yajnas. His eldest son is a vocal atheist who is openly against theism in all its forms including his family's rituals and cloistered lifestyle. Caught between the two are a loving younger brother and a largely silent mother. The movie builds towards a confrontation between the beliefs of father and son culminating in a final act where the son undergoes a spiritual conversion and takes his father's place.

The movie is commendable on its own merits. However I remember it for different reasons. As a Brahmin I witnessed first hand how 'Paithrikam' became quite popular in the Brahmin community shortly after its release. For a while after the movie came out its name came up during conversations in many families including mine. Relatives had good things to say about the movie at family gatherings. I distinctly recall seeing advertisements for the movie endorsed by prominent Brahmin priests and scholars. These usually said something like "I strongly recommend everyone to watch it" or "a poignant narrative". I believe that for some people the movie came as an affirmation of their strongly held beliefs about the "superiority" of Brahmin culture and tradition. Some perceived the movie to be in agreement with their reservations against atheism and progressive trends in the community.

I will not discuss the merits of such beliefs but instead skip ahead to narrate the tale of another movie that came out barely a year later. Hariharan's 'Parinayam', scripted by veteran Malayalam writer M.T. Vasudevan Nair also centred on a Brahmin family. The movie was set in the turbulent decades of late 19th and early 20th centuries that witnessed several changes in India's social order. The events portrayed in the movie occur not long after the Kerala Brahmin community was scandalised by the ritual trial of a Brahmin widow Savithri, alias Thathrikkutty, for adultery. The accused named no less than sixty four prominent persons from different castes as her lovers. This was also the time when progressives led by reformers like V.T. Bhattathirippad organised a movement against social ills prevalent in the Brahmin community.

'Parinayam' is the story of a young Brahmin girl who becomes the fourth wife, and widow shortly thereafter, of an old Brahmin lord. She becomes pregnant after her husband's death and is tried by a communal tribunal. The movie ends with her being cast out from home and community and starting an independent, defiant life with the help of her rebel/reformer stepson.

Here again the movie shines and can be enjoyed for its own merits. What I want to point out however is how this movie was hardly ever mentioned by the same people who were all praise for the earlier one. Going strictly by quantity and extent of Brahmin traditions portrayed the second movie should have attracted a much wider audience. And yet it failed to be even so much as mentioned in gatherings, much less admired.

Why this difference? I thought about this after I watched 'Parinayam' again very recently. I think that many in the Kerala Brahmin community are guilty of selective adoption and propagation of events defining its History. The dark tales are entirely left out when the story of a vibrant socio-religious past is told. Consequently many youngsters grow up with a skewed knowledge of history which only serves to enforce their illogical belief in superiority by virtue of birth in an "upper" caste.

In this context it is interesting to inspect how the community organisation formed by Bhattathirippad to combat social ills has evolved. What once was the refuge of rebels and progressives is now the gathering place for conservatives and the orthodox. Where membership was once a statement of rebellion today it is a bellwether of social prominence.

I have a firmly held belief that a person's caste has nothing to do with how good or bad a person he is. My beliefs aside I still wish that those who give importance to belonging to a community were more objective in drawing lessons from its past. For it is a fact of history that for every 'Paithrikam' there are all too many 'Parinayam's.

Wednesday, April 16, 2008

Extreme Programming in Action

Extreme Programming has become more "mainstream" in the Indian software industry over the past couple of years. For many companies their agile development practices have provided a reason to brag and to attract recruits. One of my friends works for such a company and recently narrated an incident highlighting how "XP" is used in his workplace. I thought I should share it with the rest of the world to provide another perspective on how XP is actually used in Bangalore.

The specific case involved a particular task which came up for development. One of the developers said that it would take him 2 days to finish the task while another thought he could complete it in 3 days. A third predicted four days if he were to do the task. The team leader heard them all out and proceeded to *assign* the task to the third guy. If you are thinking "that's not how it is done in XP" - wait, the best is yet to come. The "leader" expected the "assigned" developer to finish the task in 2 days!

From what I heard the practice is not only widespread in the said organisation but some managers actually *coach* sceptical newcomers to believe that this "auction model" is a core tenet of XP. Those who disagreed are reprimanded for unwillingness to adhere to XP.

The next time someone from this place says "we follow XP" I am going to burst a gut laughing :)

Monday, April 14, 2008

Of Festivals

March, April and May have traditionally been "festival months" in Kerala. Many Hindu temples (as well as a few houses of worship of other religions) celebrate socio-religious festivals during this season which also witnesses the turn of the Malayalam year. My trip home to Trivandrum earlier this month coincided with the annual festival at a nearby temple. It has been close to a decade since I was last home in time for the occasion. Several things have changed since then. Most notably the noise output has gone up considerably. Loudspeakers heralding the event covered an area approximately 1 Km in radius. As my house is well within this radius I got to hear music (live and recorded, instrumental and vocal), announcements, religious talks and other sounds almost around the clock. My five day visit completely overlapped with the festival's duration of 7 days to the effect that I was almost always raising my voice to talk to my family.

The loudspeakers usually came to life around 6.00 in the morning, more than an hour after the temple opened for the day. They would then blare "devotional songs" for the next three hours or so. The music was periodically interrupted for announcements. Going by voice these were all made by the same person. The announcer typically started by reciting the day's programme. He would then go on to thank individual donors whose contributions went towards paying for the day's events. Names, addresses and the events which benefited were included. He usually ended with a religious greeting.

The speakers were given a break around 10.00 AM coinciding with religious rituals in the temple. Unfortunately this break lasted barely an hour. The next "session" commenced with yet more songs and traditional instrumental music unless there happened to be a religious talk going on. Following another short break around noon the fare would continue well into the afternoon. Unexpected relief arrived on a couple of occasions thanks to the trusty summer afternoon rains. The lightning accompanying the showers forced the operators to shut down their makeshift Public Address system albeit for a short while.

The noise levels went down whenever a ritual was performed in the temple premises. After the main worship ceremony around 6.00 PM the racket would continue well into the night thanks to the "main cultural event" of the day. Such events tended to live performances of music, dance or comedy with the rare Kathakali session thrown in for traditions' sake. Plays and movies used be a part of the fare ten years ago but have since been dropped. Live performances typically ended by 1.00 AM and the PA system shut down shortly thereafter. On one particular occasion however the music accompanying a Kathakali performance started around 10.00 PM and went on until after 4.00 AM the next morning. The best part was when the announcer came on right afterwards to announce - what else - the names and addresses of the donors! I have since been told that most donors actually expect their names to be aired prominently and repeatedly in exchange for their contributions.

The last day of the festivities was marked by a procession featuring decorated elephants. The procession left the temple in the evening and returned sometime after midnight. The sound of the traditional drums accompanying the procession was broadcast for a while until a solitary voice took over to chant "Om....." repeatedly. The chanting lasted for half an hour while the procession re-entered the temple.

Interestingly several otherwise sensitive people seemed not to mind the noise pollution. These were the same folks who bristled when a political party dared to broadcast musical propaganda or speeches for a half day long meeting. One of the supporters argued that there could be no comparison between "devotional music" and "political music". My argument that both impinged on the personal comfort of those not interested was dismissed with a wave of the hand.

I believe this question was posed before the courts some time ago. The only solid outcome of such litigation has been the replacement of old, noisy, ultra polluting horn speakers with modern box models. Very few abide by the prescribed decibel levels and timings.

Monday, March 24, 2008

Meeting Dijkstra

I spent the last couple of weekends implementing Dijkstra's Shortest Path algorithm in Java. DSP is a fairly straight forward algorithm built on simple steps. Nevertheless I found it trickier than expected to convert it to code, my "work experience" and familiarity with Java notwithstanding. In the end I was able to work out a reasonable implementation after going through a few iterations.

I realised that in spite of working daily on a large body of code I was out of shape programming wise when it came to implementing algorithms. Part of the reason is my own average skill level; part of it is how rarely I tangle with algorithms at work. I suspect that this is the case with most programming jobs in town. There are other reasons as well not least of them being that algorithms require considerable thought to translate to code.

One of the interesting problems I faced had concerned representing the domain in code. For instance DSP works on Graphs made up of Vertices connected by Edges. It was fun to work out how to represent a Graph programmatically. In the end I chose method #1 suggested by Cormen et al., namely maintain Adjacency Lists.

Overall I found getting back in touch with the fundamentals an enjoyable experience. I plan to take this exercise further over the course of the next six months by working through Introduction to Algorithms. In the end I hope to emerge with a better understanding of the fundamentals.

Friday, March 14, 2008

A Sabbatical Test

One of my friends recently acted on his wish to take some time off from work. He just started a three month break from work. Every now and then I think about taking some time off from work myself. After watching my friend leave town for his sabbatical I gave the topic some active consideration. I realised that while the idea of taking time off from work was very tempting I would have to plan extensively to make it serve my purpose. Following a thought exercise I came up with a check list of things to accomplish before I can take time off. Note that the ordering is random.

1. Build A Monetary Base. I should have enough dough in the bank to cruise for the duration of my sabbatical. The time frame I have in mind is about a year. Whether I plan to leave Bangalore or stay in town makes a big difference in the estimate. I can think of a couple of other places that are cheaper but have other, outweighing disadvantages. For instance Chennai is too hot, Trivandrum is too remote and I don't know anyone in Pune :)

2. Plan Ahead. I have wasted far too many weekends for lack of proper planning. I do not wish to repeat this mistake during my sabbatical. I will have to work out a clear, weekly (or at least monthly) plan before I start my break.

3. Establish Habits In Advance. This follows from #2. I know from experience that even optimistic plans fail because I am not used performing a particular set of tasks regularly. Mental exercise is similar to physical exercise in this context. Even a modestly mind-intensive schedule needs a period of "warming up". I would rather do all the warming up work before I start rather than use the first days/weeks/months of the sabbatical for the same. This involves enforcing basic habits like going to bed and getting up at regular times, not getting "lost" for (unplanned)hours in a task however exciting it is etc.

4. Establish A Ready-to-expand Routine. This derives from #2 and #3. I spend around 10 hours at work each day including getting there and back. While all non-work activities look very attractive from the workplace it is not easy to effectively use the 10 hour or so of daily unstructured time that follows leaving work. One solution for the weak minded like me would be to establish in advance a routine that is "ready to expand". In other words I should use the time available to me *after work* every day to the maximum extent possible. Ideally this should lead to a point where any time off from work would be easily filled by one or more of the activities I have been doing.

Good examples include music practice and coding. Say I can spare 90 minutes for music practice each day, split into two 45 minute sessions before and after work. If I can take up a suitably complex piece that demands more than 90 minutes daily and work on it regularly for exactly 90 minutes a day then I would be making progress on conditions #3 and #4.

Similarly I should be able to pick up a a challenging programming goal and spend a fixed quantity of time, say 90 minutes, each day for a suitably long period.

Another important aspect in my case would be to perform *all* tasks *every* day. I don't think it would be realistic to divide a sabbatical into two or more consecutive periods where I only work on any one thing at a time. IMHO the key to making a sabbatical work is to make a little progress on all fronts every day.

5. Set "Service Level Agreements" For Friends And Family. IMHO a sabbatical is *not* a vacation. It is a life project with specific time duration and goals. I should make it clear to friends and family that just because I am "out of a job" they shouldn't expect me to spend additional time/energy thus gained on lengthy visits or other activities. If anything I expect to be busier during a sabbatical than I would have been while working.

Update: One of my friends who wishes to remain anonymous had this useful point to add: "Having a test (to be taken at the end of the period or at specific times) to check whether the purpose of the sabbatical has been achieved will be useful too. The act of coming up with the test will bring the why (take the sabbatical) question into focus. I suppose this will be an outcome of the planning activity."

Thursday, February 28, 2008

Recital

I played the Piano at a small recital organised in my teacher's home last Sunday. My piece was a Sonatina in C Major (Opus 34, No. 1) written by Johann Anton André. The piece has two movements, a song like moderato followed by a lively Rondo. The event came at the end of slightly more than a year of lessons. Last year at a similar event I was a novice sitting with the audience marveling at the performances. This year it was my turn to get behind the keys.

Unfortunately for me two of my friends were in attendance in spite of my best efforts to prevent them from coming. When my turn came I found myself quite nervous to even approach the "stage", in this case the piano in the middle of the living room. This came as a surprise. I was a public speaker in college and in spite of my many faults have never had a case of stage fright. Playing a well rehearsed piece for 25 odd people should have been easy, but wasn't because I was very anxious about missing a note or phrase.

As it turned out I ended up making mistakes in a couple of places in the first movement. I did not die on the spot; on the contrary I began to relax after completing the first few lines. The second movement went fairly well even if I say so myself.

I don't recall much about the audience reaction. I do recall that my friends did not boo but then they were not experienced enough to have recognised my mistakes :) Tasty refreshments were served afterward but my body was awash in adrenalin for me to work up much of an appetite.

In retrospect the recital was a good experience. It made me realise the need for any student of music to periodically perform in a (semi-)public setting. I would like to be a part of more such events in the future. These need not even be on the same scale as my recital. A group of four or five would suffice. Perhaps these events can be arranged along the lines of the very useful "losers club" meetings I have attended. I can think of several advantages of such gatherings. Besides bolstering their confidence attendees also get valuable feedback. The "mini-recital" format would force all to focus on coming up with measurable output (play a piece) as opposed to talking about it ("I practiced for a total of 15 hours last month"). I am talking to a couple of musically inclined friends to see if we can come up with something worthwhile. Let me see how it works out.