Friday, May 26, 2006

Itching to code

In IBM's ExtremeBlue internship, there are 4 guys in a team - 3 are technical interns and 1 MBA intern. As the sole MBA intern, it is my responsibility to come with business case for the project. After I came here, I found to my extremely pleasant surprise that I'll be required to do project management also. So, that means that I'm going to be preparing project plans, WBS (Work Breakdown Structures), resource allocations, etc. That requires a lower-level understanding of the project, but not necessarily of the code. But, it's been far too long (almost a year) since I lost wrote any code. ... Looking at my team-mates go over the code, I'm itching to start coding too, or atleast do some code-browsing. And I think I am still competent to do industry-quality software development.

But, at the same time, I think I sort of instinctively recognize that mixing project management with project implementation is probably wrong. At the very least, it will make me busy. It may probably lead to conflict of interest. But, at the higher stages, I think it violates some principle of separation and abstraction. One who is too closely involved in the details will lose sight of the strategic ideas, the bigger picture. And that would be bad for the project and for IBM.

Last weekend, I read the book Starship Troopers, by Robert Heinlein. It is a military space fiction book, the sort that David Weber is so good at - indeed, Honor Harrington series is my favourite novel series ever. Anyway, in that book, in the Mobile Infantry division, the rule is everybody fights - including whoever assists in administrative and logistical work and including the general himself. Unfortunately, the same can't be said about software development. Somehow, it makes sense to have a proper separation of responsibilities, assuming that people in management have some practical programming experience. After all, you can't ask employees to do what you have never done ...

I think, for me, programming would be a good hobby to have, provided my regular work keeps me away from the computer. As it is, I'm almost addicted to the computer, so under the current circumstances, programming, even as a hobby would be disastrous to me personally. So, after a lot of thought and introspection over the past week, I've decided to refrain myself from going into the code-level aspects of the project. The fascinating aspect of it was realizing how difficult the decision was ...

Java ... enlightenment !

I had never understood Java. First off, was the disappointment that I was no longer free to do anything I liked (read: play with pointers). The next was how complete the library was ... if everything was implemented, then what is the point of learning all the algorithms, data structures in engineering ? And now, almost a year after I (reluctantly) gave up coding for potential management opportunities (I still don't know if I'll pass my MBA course :-), I have finally understood Java.

I'd been used to Pascal and C/C++ before learning Java, and therefore, the mysterious interfaces, and the voodoo objects to be inherited to create a thread or even a GUI window ... I could never understand what Thread as an object meant and what inheriting it meant in the classic OO meaning.

Last week, someone forwarded me a link that talks about frameworks. Having created a (small but flexible) framework myself in Netscaler, I thought I knew most of it. I found out I did, but for the essence of it all. The author calls it the Hollywood Principle - don't call us, we'll call you. I had actually implemented similarly in my framework, but I had never actually understood the point. Now, I could conceptualize Java as a framework (with JVM as a platform), and not as a language ... instantly, I was enlightened.

In a flash, I could understand the core of Java and, more importantly, why it is used for building applications in platforms like Eclipse, something I couldn't during all the years of my engineering. Suddenly, Java doesn't appear to be meant for brain-damaged code monkeys after all. How humbling !

Friday, May 19, 2006

Back to work

It has been a nostalgic experience to get back to work (though as an intern now). The first day in IBM involved completing joining procedures, getting to my cubicle, getting the desktop PC ready, installing my favourite software as soon as I can and then start chatting and web-surfing. At Netscaler, my first day did not involve a lot of joining procedures, but mentally, it was similar - in an unknown place with unknown people and most important, in an unknown work culture. And then, in both cases, followed up with reading the product documentation for the rest of the week. And thankfully now, I don't need to setup a development system - that was a major headache then !

Looking back, it is important that I not repeat the mistakes I made at my previous job, and God alone knows, I made quite a few.

I've been traditionally slow to get off the starting blocks, and in my work, that was true as well, for I went through a very difficult initial period where I was short of confidence and a sense of purpose. And most of the problems I faced were of my own creation. Given my performance and commitment in my 1st year at SJMSOM, I'm afraid I'm living in my past without learning any lessons from it. So, that means two big mistakes: the first being that I'm not living in the present; and second, that I've not learnt anything from my past.

Next, the concept of work-life balance was shot to hell. I loved my work - most of it anyway, barring the odd times where I needed to contribute material for man pages - and I loved it dearly and most of the time, I gave it my maximum. I didn't stop at just loving it, I was obsessed with it - so obsessed that I was constantly thinking about it during day and night, even in my dreams. In fact, when I quit my job and joined SJMSOM, my biggest problem was not home-sickness, it was work-sickness.

And perhaps as a consequence, my work hours started going up. Flexi-time is great if you are used to rigours of fixed lecture hours in college (and especially for a student of PESIT), but for one who is yet to understand the importance of self-discipline, it is a curse. I did not know how to efficiently make use of my time, and consequently, my work hours increased gradually and within a few months, I was regularly logging around 14 hours per day, plus a few hours on Saturdays too. I knew it was a bad habit, but at first, I didn't realize exactly why it was so. A little bit of introspection gave me a clue - I used to think that since I stayed late, I could always do work later, and this ensured that I wasted a lot of time and pushed productive work to the end of the day. And when I found I could not complete it, I postponed my departure also, and gradually, my performance and productivity detereorated. Of course, I'm simplifying a lot of things, and there were a lot of factors, but the crux of the problems I faced was in me, and the solutions had to be found within myself. Once I recognized the problem, I cut down my work-time to 10-11 hours, and eliminated all unnecessary work. I could do more work in 10 hours now than I was doing before in 14 hours :)

The next problem was quality. In college, my mentality was to pass exams and not do quality work. Therefore, I wasn't unduly perturbed by the completeness of the software, but only by the one use-case which we were sure would work, and I would rehearse the steps, and demo the exact same sequence to the lecturer. That wasn't so good at my job ... for the first time, I was expected to write code that would be complete and correct. There were no excuses for bugs. At first, in my typical arrogance, I didn't even do unit-testing - I thought that after all , I am such a good programmer, there won't be bugs anyway, so what is the point in unit-testing ? My pride went crashing down (and plunged into the depths) when I checked in my first major project, the GSLB configuration re-write. BUG10827 (how can I forget that ... ever ?) became my constant companion in my worries and ultimately, the cause for a turnaround. I initially hated the work, but then started loving it and finally, transformed my attitude so much that I wanted to give my best, and in some ways, achieve that too. It was necessary since the re-write proved unexpectedly complex, and only my sense of idealism kept me on the track during the frustrating times.

Sometimes I found I wasn't all that bad. One thing that served me well in my job was my habit of questioning everything and not accepting anything as a given. It made me come across as agressive and arrogant especially if the target was other people's code and the test cases of the DevTest(QA), but I always felt there was a better way of doing something, though not necessarily that I could do it. It also made me develop Keep Alive Scripting (KAS) as an alternate way of scriptable monitoring and check it into the repository without telling anyone :) And then, I dared to insist that it become the default way, because I was convinced that it truly was a better way.

Another, was daring to use Linux for development. I found that Windows wasn't all that great a development platform, and emacs+cscope was good enough for kernel programming and I stuck to it for 2 years. I was a pioneer in using Linux in the Bangalore office, and seeing my example, others too started using it. Linux also gave free Apache and BIND servers, lots of networking tools and iptables firewall that I used for my development.

Most importantly, I discovered a few good things within myself - my attitude and my idealism. Without that, a difficult job would have been impossible and with it, it proved to be an enlightening and transformational one.

Thursday, May 04, 2006

Superstitions and religion

In his book Raja Yoga, Swami Vivekananda has said that religion cannot be the subject of debating societies or school boy clubs. Perhaps that applies to a student of School of Management of IIT Bombay, but I'll take the chance !

My two-and-a-half year old niece had her head tonsured in Tirupathi. People usually resort to tonsuring the head as a matter of quid pro quo. Now, If people are really devoted, why do they offer their hair, of all things ? Why not their hands or legs ? Surely, there is bound to be something more valuable than dead-tissue that grows back rapidly ! I also wonder what God is supposed to do with this hair ? And who let people grow the hair in the first place ? :-) I wonder who is fooling whom ? Are we fooling God in getting the better of this "bargain" or are we fooling ourselves ? If people claim faith in God, really speaking, they should be asking - "What is the most valuable and unique thing that I can give God ?" and not "What is the cheapest that I can do, so that God is satisfied and I don't make much of a loss". To put it bluntly, this is a sham.

It is often assumed that the uneducated or unintelligent are superstitious ... in my opinion, education and intelligence don't have much to do with superstition. Soccer players believe that their success depends upon the shirt numbers printed on their back. Chess players wear a "lucky suit", the dress they wore in some game that they won.

It is when superstition gets mixed with religion that things start getting funny. For instance, no good work is supposed to start on tuesday. But, confusingly, in vernacular language, Tuesday is "mangal vaar" literally meaning "auspicious day". After completing my final semester BE exams, many of my friends did not join work on 1st July 2003, because it was a tuesday. They joined either on June 30th or on July 2nd. And these were highly intelligent people, among the top in Karnataka in their respective engineering streams, and placed in top IT companies. I was born on a Tuesday and I am seriously prejudiced against someone calling this inauspicious !

Even more of a headache is this concept of raahukaal - a supposedly inauspicious time everyday, where no important thing has to be performed. No wonder our country is like this, because we have been accustomed to avoiding work. I wonder if this is a self-fulfilling prophecy for those who believe in it...

Because religion is such a petrified thing and no one questions religious beliefs (or rather, people are encouraged not to question), explaining away beliefs in the name of religion is very easy. If you ask something, the reason given is "it says so in shastras", though if you persist in asking, they don't know what these shastras are and what they are supposed to do and what is the reason behind these beliefs.

I've found that behind every belief there is a kernel of truth covered by layers of stupidity. For instance, I was told not to cut my nails in the night. It might have made sense back when there was no bright artificial lighting and safe nail-cutters that we have today, that there was a risk of injuring myself. I don't think it holds true any longer. So my hypothesis is that, superstition is created by someone doing something sensible repeatedly and others following, till nobody knows why it is done, except that traditionally it was done that way. That brings me to the point of tradition - while rebellion for the sake of rebellion is stupid, even more stupid is to follow tradition for the sake of it.

It would also be instructive to understand why superstitions exist and why people follow them.
The essence of all superstition is
a) a belief that there is an unseen force or power that influences all successes and failures and
b) we are afraid of this force or power
c) We don't know how this force works, and therefore, we can propitiate this power by tiny bribes or simply by not getting into the "wrong side". In other words, it is the fear of the unknown.

Fear kills reason, and superstition is an irrational thing. People confuse superstition with faith, and try to justify superstitions as a matter of faith. But, really speaking, superstition is a lack of faith - lack of faith in philosophy, lack of faith in God and most importantly, lack of faith in ourselves. The message of religions has been twisted to make us afraid of God, and therefore we end up trying to appease God. We also end up projecting our fears and inabilities on our imagination of God, and try to enter into a sort of business transaction !

Much to blame for this is the fact that in our society, in our culture, we are taught to obey elders unquestioningly. I beg to differ. Elders are to be respected - after all, they have survived in this world for longer than we have, so they must have atleast a little bit of wisdom. But, obedience because of "I say so" ? It is not only elders' fault - we youngsters unquestioningly accept whatever is taught to us, either even in education. We youngsters are the propagators of the beliefs - so I suppose, much better than blaming the society, we who can choose what to follow and what not to, so that we create a society where we are no longer meek and timid.

Tuesday, May 02, 2006

Holy Cow !

It is always interesting how we blindly follow our elders. In most of the circumstance, we don't understand the need or necessity of the rituals but still follow it, obediently and unquestioningly. Now, I've always been a rebel and most of the times, I used to rebel just for the sake of it, though I have outgrown the habit and I'm a bit more focussed in my rebellion and now, almost inevitably choose the Hindu rituals as my targets, because my family try to force me to participate in rituals they don't know about.

My sister's house's Grihapravesham took place on Sunday. As per the custom, we perform aarthi to a cow and get it to come inside the house. We also noticed a street dog trying to get in (I later found out that the dog was roaming around the empty site first and then the half-finished house, so in a sense, it was the first ever resident of the house ! ). Almost inevitably, it was shooed away. 

I was upset, seriously. I felt sorry for the dog. I have no reservations against worshipping the cow, but I really do have serious concerns when the worship isn't universal. Cow may be sacred, but equally sacred is the dog. Don't the upanishads say God is everywhere - "Eko devah sarvabhootheshu goodah, sarvavyaapi sarvabhoothaantharaathmaa" ? When we worship a cow, what do we worship ? The cow itself, or the perceived sacredness of the cow ? Now, since the divine is supposedly present everywhere, how come a dog is unworshippable, and is actually considered dirty ? There is also a ban on cow slaughter ... I wonder why ? Everytime I take an antibiotic, I kill millions of bacteria in my system (even useful ones). And don't tell me that bacteria are not sacred. If a cow can be considered sacred, spiritually speaking, a single bacterium is also equally sacred. I can take this argument to more ridiculous lengths, but I think there is a lot of absurdity that has seeped into the rituals. 

And there's more. The band of vaadyaars aka purohits aka pandits (there were around 5 of them, most of them oldies, with beards) started chanting the vedas, most of which I don't know. But, when they started chanting the purushasooktham, I'm curious. I wonder what the relevance of chanting purushasooktham to a Grihapravesham ceremony ... not that it is a shooting offense, but I don't see the relevance, unless of course, they chant the same vedic verses for everything. They also skipped the last few verses of vishnusooktham ... The chanting itself was another comedy. Vedic chanting is supposed to be measured, with proper incantations, and stresses at right places. It is not supposed to be a Formula 1 race, but it actually turned out to be exactly that. One of them didn't know most of the vedas, another did, but was chanting at top gear most of the time. Others used books ... So, what the hell (should I rather say, what the heaven ?) were they trying to achieve ? One reason may be that, Sunday, April 30th being an "auspicious day", they had many such functions to perform, so they were trying to speed up things. Give me a break, I've been watching them ever since I learnt to recite a few upanishads, and I know most of the vaadyaars don't chant properly, skip things in the middle, and come to think of it, don't even know the meaning of what they chant. The last point may not stand scientific proof, but I've asked the meaning of Gayathri Manthram from a lot of people, and most don't know. And how else shall I interpret the recitation of purushasooktham in a Grihapravesham ceremony ?

I can go on more, but let that be a different post !