Wednesday, October 04, 2006

How did I do it!?

Ever since I wrote about my participation in the Bangalore International Marathon, I've been inundated by requests to blog about my preparation for the same. (Ok, actually, there was only one request from my friend Kattricker, but a little bloggetic license never hurt anyone, eh?)
I kind of decided at the beginning of the year (it was actually one of my new-year resolutions) that I should participate in a marathon this year. So, I started practicing - running around 5km/day (actually jogged/walked/ran for 5kms) on weekdays and 11kms on weekends since February of this year. This was on empty stomach, with no fluid intake in-between. Midway, I realized that completing 42kms in 3+ hours was simply not my cup of...well, Gatorade, so I decided to go in for the half-marathon. And I continued this for nearly 4-5 months.
Just before the race though, I had a quiet period because of work pressure, and couldn't keep up the schedule. But anyway, I had to attempt this - I had come too far down the road to give up. (BTW, thanx to a mythical creature who egged me on.) So, the day before the race, I ate well, slept early (as the race was scheduled to begin at 5:30AM, I had to get up real early), and was off. I wouldn't have completed the race if I wasn't paced by my former manager, Venky. He had run in the previous race, and showed me how to pace myself. Another thing we kept in mind was to drink just enough water to keep us going, and not gulp down a litre at each leg of the race.
So, that's it...and BTW, if you folks are under any illusion that this is something great, let me tell you that my average speed of around 6kms/hr, is just above normal walking speed. So, it is just that _I_ entered the race - anyone else could've done it with equal or greater ease. Finishing it in around 2.5 hrs - with an average speed of around 8-9kms/hr - now that'll be an achievement.

Sunday, October 01, 2006

Where is my post?

Did you folks know that you cannot search for posts older than a certain date in Blogger? I was looking for one of my early posts, and the search facility in Blogger was of no help!

I also looked for a feedback link to give them a piece of my mind, but that doesn't seem to be present, either!!!

What is happening, Google!?
(For the skeptics, try this: Search for "Gandhi" in my blog. You'll see one result with the title "Nostalgia updated". Then, go to this link:
http://gopswritings.blogspot.com/2005_05_01_gopswritings_archive.html and you'll see another instance of "Gandhi". Why isn't this shown in the results!? Or why doesn't Blogger come forth and state that posts before a certain date cannot be searched!?

Saturday, September 30, 2006

Blow hot, Blow cool

One thing I never understood about the Americans is their obsession with the two adjectives hot and cool. From what I know, 'hot' means being beautiful/attractive, and 'cool' means being with the times. Physics be damned, most American lives circulate around making themselves both hot and cool, and at the same time! It starts in childhood when every girl has to become a 'hot' cheerleader and every boy a 'hot' football player. At the same time, every child has to be cool - which essentially means they should have a position at the popular table in school. Anyone who is warm is essentially consigned to the dustbin as a geek, dork, nerd, or a whatchyagonnacallit.
And the trend continues throughout. That you have to be both cool and hot to get dates is a given. What is funny is how parents (some of them at least) try to be cool with their kids. Trying to pickup teen-lingo, trying to 'hangout' with them, trying to be with the times in letting them do as they like...the scene would be hilarious if it wasn't so tragic.
That really is the tragedy of the US. If President Bush is really serious about 'reforming' the education system, the first thing he'd have to do is to get the US rid of this temperature obsession. That is the reason many US kids don't do well in maths and science. There are few problems with US public schools - if Indian schools had half the infrastructure, facilities and teaches that US public schools have, there would have been no software industry in the US. What is required is a little perspective.

Sunday, September 17, 2006

Christopher Alexander

Most folks in the software field know about Design Patterns - the timeless way of designing software first elucidated by the Gang of Four. But not many know that the original inspiration for these patterns came from Christopher Alexander - who in his all-time classics "The timeless way of building" and "A pattern language", captured patterns in architectural design for posterity. I've been trying to buy these books for some time now, without success, but today, I saw on Eric Raymond's site, a lot of information about the same.

Bangalore International Marathon 2006

Today I completed the half-marathon organized as part of the Bangalore International Marathon event. All 21.097 kms of it. It was fun!

Sunday, September 10, 2006

Technology notes - Vol I, Ed I, Sept 06

For some time, I've been thinking that I need to have a regular spot on my blog for anything I want to write about technology. So, in the spirit of the times, I'm calling it "Technology notes" - random jottings about my tecxperiences. ;)

* Why hotmail sucks

I've been using hotmail since the time it was the only free, web-based, e-mail service provider, way back in the mid-1990s. Even when I got my Yahoo and Gmail accounts, I continued to use my hotmail account for some of my e-mail. Of late, Microsoft has paid more attention to Hotmail, and I now have like 2GB of free storage, and a whole new interface that looks just like Outlook. While the extra storage is welcome, and is a marked improvement over the 2MB I had earlier, the new interface, simply sucks.

First, it takes a long while to load. Then, I still need to click on "Inbox" to access my e-mail. Why can't Hotmail (and Yahoo) simply take me to my Inbox? Do I login to check my Junk e-mails, or do I login to check my Inbox!?
My next peeve is the usage of screen real-estate. The "Windows Live" banner takes away 25% of screen space, and there is a lot of additional white space surrounding it, which makes my e-mail pane really small and forces me to do a lot of scrolling. This is another illustration of forgetting user needs over self-aggrandization. It doesn't look like the product has seen a lot of usability testing.
Finally, there is the point about Junk e-mail filters. Hotmail's is probably the worst in the business. There is hardly any filtering done and all the junk simply lands up in my Inbox totally reducing my effectiveness in processing my e-mail.

Anyways...

* Unicks rocks

Heh heh. Did I just hear a "I told you so" from somewhere in Sahakaranagar, Kansas City, LA and Singapore? All I can say in response is that I believe in the "horses for courses" theory. There are things about Windows that are nice, and the same holds for Unix. But anyway, coming to the point of this post - the problem with WYSIWYG (What You See Is What You Get) is WYSIWAG (What You See Is All You Get). No designer can design a GUI for doing everything a user may want - but a group of well written tools that confirm to an interface can rock your world.

How did I realize this? Well, recently, I had to create a password file for a project I'm working on. The file stored a triple - username, password and a user directory for users enrolled in the system. For bootstrapping, I already had a directory tree with a lot of user directories listed, so I wanted to write a script that'll run through the tree, and dump each folder name into a text file in the format X, , X, where X is the directory name and passwd is a number that gets incremented for each directory.
Question was, how can I do it easily on Windows? Well, a small C program might do the trick, but then I need to check for file handles, and stuff like that which is clearly not an option. DOS shell scripting is too primitive - for example, the for loop can only execute one command! So, if you want to execute multiple commands, you need to put them into a separate batch file! And I don't know anything in VB, so there was no way I was going to write my 'program' in VB script.
I was in a quandary, cursing myself for not having a Unix shell somewhere, when cygwin came to my rescue. One install and two lines of shell script later, my password file was ready!

So there. While GUI's have played a very important role in making computers more accessible, a shell prompt is indispensable if you are doing serious programming, as I realised after this experience.

On an aside: Eric S Raymond has these fun Unix Koans, with the one about GUI's being the best. Read them here.

Sunday, September 03, 2006

What in h*ll is wrong with Rahul Dravid?

What in h*ll is wrong with Rahul Dravid!? I mean, when he became captain, I thought he was probably the best choice for the post. Unfortunately, he has proven me wrong repeatedly. Here are a few instances:

- Handling Sehwag: Clearly, Sehwag's performance is nothing to write anywhere about. But still, he continues to be in the team, at the expense of younger talent like Robin Uthappa who had like a dream start to his career. Now if you want to groom young talent, why keep Sehwag? And what impact will this have on Uthappa's confidence!?
- Handling Kumble: This is most shameful. How can you drop India's best bowler for the Champion's trophy? If you want to select him for the next world cup - which everyone mostly thinks will happen - you have to give him match practice. If you don't want to select him - which is disastrous - tell him straight and ask him to retire. Is this the way to treat one of the best bowlers in the world!? Instead of issuing platitudes like "Kumble is the best bowler we have", why not say openly, yes, we want Kumble, and this is how we want him!?
- Handling Saurav: I wrote about this earlier too. But what is really poignant was Saurav stating in a recent interview that neither Greg Chappell nor Rahul Dravid had spoken to him about why he was kept out. While I don't disagree with the decision to keep Saurav out, is it that difficult to simply walk up to him and tell him why he was kept out? Isn't it incumbent upon the captain to tell players why they're kept out? At least, for courtesy's sake!?
- Dhimmitude: This has happened many times. See this post for an instance.
Sorry, Dravid. India expects better from you.

Yet another change of name

For sometime, my posts haven't been justifying the title my blog had - "Why life sucks". So, I've changed it again. It is now 42. The answer to the ultimate question. So, in a way, I am pompously suggesting that my blog is the answer to the many questions I pose for myself. :D

Saturday, September 02, 2006

The average curse 2: Not having a niche

Earlier on this channel, you read about the average curse and how it has impacted my life. Recently, I changed companies, and the average curse has comeback to hit me with a vengeance. But this time, it has more than one dimension. While earlier I only cribbed about having friends who could do things better than me, I now face an entire battalion of more-capable people, that too in my favourite areas of CS.
I was having lunch with some of them, and was simply amazed at the depth of their knowledge and the sparkle of their intelligence. There were many topics being discussed - from the organization of files in Unix to the way malloc works, to database queries, and database-object oriented round-tripping. Each of those persons held their own in their topic, and that was when it struck me.
I have no niche of my own.
Now, that, my dear readers, is the real disaster of the average curse. Not knowing what you're good at. Not having a niche. Not being able to hold forth in any area of your choice. And how much time has it taken for me to realize it!!!
Anyway, another 'get it off the chest' post.

What makes a good programming language?

Have you (if you are a computer software geek) ever wondered why some programming languages suck? I mean, for example, you have languages like C and C++ that are extremely powerful for system-level programming, languages like Pascal that are easy to learn, languages like ML that make things like writing a compiler a matter of a few hundred lines of code, and yet, there exist half-dead languages like Ada, that no one uses? Why do languages suck? Or, more importantly, what makes a good programming language?
Well, here are my criteria:
1. A good language is designed for the designer to code in.
i.e. The language has not been designed for 'them' - who ever they are. So, this automatically puts languages like Ada (which was designed by a committee (a defence committee, no less)), C#, (which was designed with one single motive) and Java, (which was designed for those poor object-oriented programmers who couldn't figure out multiple inheritance) in the trash can. Languages like C, PERL, Pascal, Fortran, C++, on the other hand, shine in this category. Note, I'm ignoring Python because I haven't programmed enough with it.
2. A good language tries to do as much as possible at compile time
Good languages try to find as many defects at compile-time as possible. They are usually statically typed, and enforce type-safety in varying degrees.
3. A good language is never created with corporate interests in mind
I don't need to expand on this.
4. A good language does not underestimate the programmer
Why doesn't Java have multiple inheritance, or enums? Because, ostensibly, they "confuse" users. Well, Einstein's theory of relativity is confusing. So, should we ban it!?
5. A good language respects the programmer's application domain
My favourite recent peev is the way C# handles structs. Now, user-defined structs cannot have default constructors. So, the compiler will provide one, initializing all members to zero. Normally, this is OK, except if the zero-state is an invalid state for your application domain. Let's say it is - then what do you do? A famous book on .NET framework design suggests that you make it valid! So, the language will not serve your purpose, you'll serve the language!
6. Beyond these, a good language gives you good expressive power, excellent libraries and run-time support, and great documentation.
Well, obviously.
I know this post is incomplete, and there are many other criteria for a good language. If you feel strongly about any, post it below :)

Saturday, August 19, 2006

Way to go, Gulzar!

Just yesterday, I heard that Gulzar has been nominated for the Dada Saheb Phalke award, along with actresses Sulochana (of Marathi cinema) and Suchitra Sen (of Bengali cinema, most famous for her role of veteran politician in Aandhi). IMHO, the award couldn't have come later. Gulzar is most famous for his superb lyrics in some Hindi movies - notably those that had RD giving music. From the melancholic "Tere bina zindagi se koi shikva"[Aandhi] that celebrated Sanjeev Kumar and Suchitra Sen's longing for each other, to the "Do diwaane sheher mein"[Gharonda] that immortalized Amol Palekar and Zarina Wahab's middle-class aspirations, to the peppy "Chal Chaiyya Chaiyya" that symoblized 21st century style, Gulzar's songs spanned generations and genres with ease.
His directorial ventures were successful too - with Aandhi and Maachis being my favourites. And just so you know, if you've watched the cartoon "Jungle Book" on DD or any of the cable channels, the title song "Jungle Jungle baat chali hai pata chala hai" was penned by Gulzar!
Indeed, a worthy choice for the highest movie award of the land. Here is my vote for the legend.

Saturday, August 12, 2006

Measurement

Lord Kelvin once said: "When you can measure what you are speaking about and express it in numbers you know something about it; but when you cannot measure it, when you cannot express it in numbers, your knowledge is of a meager and unsatisfactory kind." How true. And Einstein showed that the variables need not even be complex with his everlasting "E=mc^2" equation.
One drawback of this is that most laymen think that everything expressed as a number is either correct, or scientific, or both. For example, take HDK (Kumaraswamy)'s injunction that he is 12.5% satisfied with his performance. Now, what does this figure mean, unless you know what the "per-cent" actually means? There are many instances - for example, ministers rating themselves on scales of anything from 5 to 10, industrialists rating budgets, and not far away from 'home', project managers tracking projects with Microsoft Project plans. In today's world it is possible to give anything respectability as long as you express it as a number.
Oh, and the scientific world isn't immune to this phenomenon. Those of you who read science fiction (and those who read my Michael Crichton forward :D ) will know of this 'equation':
N=N*fp ne fl fi fc fL
This is the famous Drake equation from the 1960s to estimate the number of advanced civilizations in the galaxy. N is the number of stars in the Milky Way galaxy; fp is the fraction with planets; ne is the number of planets per star capable of supporting life; fl is the fraction of planets where life evolves; fi is the fraction where intelligent life evolves; and fc is the fraction that communicates; and fL is the fraction of the planet’s life during which the communicating civilizations live.
Tell me, if someone had told you that the probability of finding intelligent life depended on all the factors mentioned above, in plain English, would you have taken that seriously? Now that it is in the form of an 'equation', it has to be right, doesn't it? Well, what is the problem with this 'equation'? Simple,
a) It cannot be verified
b) It has, (and therefore, as some folks conclude needs) no proof
c) There is nothing you can do with this equation. OK, we might be able to calculate (or at the least estimate) the values of N and fp. But what will we do with the values of fi, fc and fL? Do we go by statistical data? In that case, we know of only one planet in which life evolved, and then evolved into intelligent life. So, is the fi factor = 1? But what about all the planets and stars and solar systems that we haven't even 'heard' from? How do you factor those into this 'equation'?
Thanks to Michael Crichton for writing about this one. Read more of his thoughts and opinions at this site.

Nostalgia updated

I was channel-surfing today, when I came across a programme on one of the news channels about public service messages that were telecast on Doordarshan ages ago. You folks may remember those too - there was one with many famous sportspersons carrying a lighted torch, and another one about Mahatma Gandhi, which showed his simpliciy through a line sketch. But my all-time favourite was "Mile sur mera tumhara" - sung in a bevy of languages. Today, while watching the video on the tube, I must say, I had goose-bumps. It is hard to believe that Doordarshan could come up with such a 'cool' video - simple, easy-to-understand, with no bombastic claims, and still conveying the central message of national integration.
The video was telecast for the 40th year of Independence, when Rajiv Gandhi in his "Naani yaad dilaadenge" mood went overboard with nationalistic sentiment.
What's funny is how much India has changed since then. Twenty years is a miniscule period of time for a civilization that has spanned 5000 years, but the amount of change that has happened in the last twenty years has clearly dwarfed those that happened over the preceding 4980 (to be mathematically accurate).
Would such a video be successful today? Will a honest-to-earth video like this one succeed in the pop-patriotic world of today? Let me know through the comments link :)
BTW, a few graduate students in MIT made a similar video in 2003 - view it here
Update - Listen to the original soundtracks at raaga.com.

Saturday, August 05, 2006

In love

Folks, I know this may come as a surprise to many of you, but it is about time I told this out in public. Yes, I am in love. Desperately in love. The 'object' of my affection stays near my place - she is a beaut, if you know what I am talking about.

When it comes to looks, there are few of her kind that can even hold a candle to her. She's so cool that she makes the Arctic Circle feel like a sun tan joint. She's so hot that she can melt your heart. Not just that, she has this amazing purr in her voice - which is simply to die for. She's got amazing brain-power for someone who looks like her, and not just that, she's low maintenance. Well, not absolutely, but relatively. On the outside, she's as tough as steel, but on the inside, she is one soft, sweet thing. Well, I could go on and on about how well she handles the rough roads of life, but I'll simply be making you guys jealous. So, let me desist.
Ever since she's come into my life, my travails have morphed into fun. Her smooth voice humming in my ear, I've been able to take on some of the most tight situations in life. She's with me almost everywhere I go, and when I don't take her along, she doesn't complain. A nice word is all she asks for - she's more than happy to let bygones be bygones when she gets it. She has also adjusted remarkably well with my family - they all love her, and in particular, my nephews just can't get enough of her.
So who is she? It sure was tough getting her to agree, but I've posted her photo on my website - go check her out.

Sunday, July 30, 2006

Mohammad Rafi

Tomorrow (July 31st) is the 26th death anniversary of the great conniseur of Hindi music, Mohammad Rafi. One of his kind, Rafi stands like a beacon of light in the darkness of present-day Hindi singers. No, don't get me wrong, Udit Narayan, Sonu Nigam, Abhijeet, are all excellent singers, but no one has the class that Rafi, Kishore and Manna Dey commanded in their heydays.

Of the three, Rafi was (and is) my favourite. Be it the melodious "Mere Mehboob tujhe" from a movie of the same name, or the peppy "Yeh chand sa roshan chera", or the sorrowful "Raha gardishon mein hardam", Mohd Rafi was the voice that made the actors of those days. Of course, the songs then had great music and wonderful lyrics, but Rafi's voice added that icing on the cake that made each one of his songs special.

My introduction to Rafi was with a song he sang for "Hum kisise kam nahin" - "Hai agar dushman dushman". This was the beginning of my 7-year association with my dance troupe. (Yes, I know it is hard to believe.) Anyway, I was one of the background 'dancers' for this song, and loved it. Later I heard more of Rafi - and when we got our tape-recorder, I spent hours listening to his songs on tape and radio. In fact, I've lost count of the number of Rafi songs that I recorded from the Radio - from programmes like "Bhoole Bisre Geet" and "Aap ki farmaaish". Indeed, those were the days.

See more of Rafi at www.mohdrafi.com

Which is your favourite Rafi song? Let me know.

Tuesday, July 25, 2006

'Great' minds think alike :)

Earlier, I had written a post on the similarities between technology and art and how the two stem from the same core of human spirit. While browsing on some topic, I came across this article by Paul Graham which talks about the same thing.

As they say, 'Great' minds think alike! ;)

Comments invited as usual.

Friday, July 07, 2006

World domination, Google style

A lot has been said and written about Microsoft's attempt at world domination by proliferating its software on computers. Even more has been written about its attempt at reducing competition to dust by giving away software for free (Internet Explorer, for instance.) What has gone unnoticed, in the meanwhile, is Google's wonderfully silent attempt at the same.

For the uninitiated, Google has just released Spreadsheets - an Internet-based spreadsheet application ( or applet?) that will be available for free use. Ofcourse, by default, the files you create will be stored in your Google account, hosted on what else? Google servers. So not only does Google get you to abandon Excel, but it'll also hold you to ransom - your income tax returns for instance, will be available to Google's administrators if they were interested.

Wonder why no one is raising a hue and cry about killing competition by offering software for free. Wonder why no one is raising a privacy issue about having your files stored on their servers.

Anyways, folks, this is world domination Google style. The only difference is that you don't have to pay for it.

Thursday, July 06, 2006

Shashi Tharoor

I had mostly ignored Shashi Tharoor's nomination as India's candidate for the UNSG's post until my friend Prad and his friend, G3, blogged about it.

I think this is one of the most stupid foreign policy decisions that the Manmoron government has made. Why? A MBA-friend once explained about the risk-reward concept by saying that some risks are acceptable provided the rewards are proportionally higher. What is the reward India gets if Tharoor gets the post? One word: Nothing. He is not going to support India on any issue of consequence, he doesn't have a vote that can make a difference to India, nor can does he have executive powers - for example, to tell Pakistan to buzz off from Kashmir. In fact, why has no big country ever held the post? Because unlike what we are told in our f'ked up Civics books, the UNSG is nothing like a World President. He is more like a World Puppet - a very well paid one at that. Shashi Tharoor has obvious interests in becoming the UNSG. India gains nothing by proposing him to the post.

What are the risks? Well, first off, we'll now be counted as a country on par with Thailand, Sri Lanka and Pakistan - that have all made nominations for the post. And if God forbid, India were to lose (which isn't all that improbable), it'll be a huge slap on our face. Not to mention the fact that we can write off Sri Lanka's and Thailand's support for an UNSC seat - if that were ever to be put to vote. Or the fact that we just ruined a relationship with Sri Lanka by announcing Tharoor's nomination just when the Sri Lankan foreign minister was in India asking our support for his candidate.

So, this is just some sort of personal give-and-take between the lefties, the soft-lefties and the Manmoron government. There is nothing India will gain from the move. In fact, this might be the first nail in the coffin of our UNSC hopes.

Congrats, moron!

Wednesday, July 05, 2006

More shayaari

Many of you would have heard the hit song from (I think) Mohabbattein:
"Aankhen khuli ho ya ho band
deedar unka hota hai
kaise kahoon mein oh yaara yeh
pyar kaise hota hai"

Back in NCSU, I was working on our SCTP project with a couple of friends, and to our surprise, our test server was receiving the SACK*s from the test client without the protocol (which was the intermediary) being notified - infact, the SCTP socket wasn't even open! In a moment of inspiration we came up with this song:

"Socket khuli ho yaa ho band
data transmission hota hai
kaise kahoon mein oh yaara yeh
SACK kaise aata hai"

*(SACK = Selective acknowledgement - a packet sent by the receiver to the sender acknowledging the receipt of a set of packets)

Khud ko itna...

"Khud ko itna buland kar ki har takdeer se pehle, khuda bande se pooche 'bata, teri raza kya hai?' " - one of my all-time favourite shers. For those who don't get Hindi quite that well, it means: "Raise yourself to such heights that even the Lord, before deciding on your fate will ask you for what you want."

When I was in my previous company in India, the Kargil war was on, and in one of the Indo-Pak rivalry chatrooms, we used a modified version of this sher:

"Khud ko itna buland kar ki Kargil ke choti pe jaa pahunche aur khuda tumse pooche 'abe gadhe, ab utrega kaise?' " - which, for the shaayarically challenged means: "Raise yourself to such heights that you find yourself on the tops of the Kargil mountains and the Lord asks you 'you idiot, how will you get down!?' "

If you folks know who authored the original, please let me know.