Saturday, July 05, 2008

The art of Microsoft (R) Windows (TM) programming

Eric S Raymond has an amazing set of Unix Zen koans here. His book, The Art of Unix Programming summarizes the Unix philosophy extremely well. I've wondered for a while if there was an equivalent for the Microsoft way. The closest I came to was an article by Joel Spolsky called Biculturalism. There were other posts I found on philosophy of specific windows features, but I failed to find anything that describes the Microsoft way of programming.

Recently, we had a talk by Dr. Sundar Sarukkai from NIAS on the "Philosophy of Science". Suggesting that despite it's attempts, science wasn't independent of the observer, and that it had a belief system not very unlike religion, and with its language, mathematics being incomplete, science too was incomplete, Dr. Sarukkai raised a few hackles amongst the listeners. Personally, while I thought that they were all interesting observations I didn't agree with the conclusions he drew from them, but that is a story for another day.

What this talk did though is to force my train of thought towards the station of philosophy - specifically, programming philosophy for Windows. Now, Eric Raymond and Joel Spolsky make the point about the GUI being part of the application instead of being an afterthought (as in Unix), and I agree with that. But a fundamental principle of every Microsoft API is to get programmers hooked with rapid development of basic applications. As early as MFC, you could create a fully functional Notepad application without writing a single line of code. Then there was COM that attempted to hide the complexity of developing distributed applications from you. Today, we have .NET, with LINQ, giving you hidden code generators and attributes for everything from RPC to serialization to workflow management. The underlying principle of all these APIs and platforms is to give users a helping hand when they start, by hiding complexity. In short, a large part of the new Microsoft APIs are tailor-made for the novice-intermediate programmer, who wants to develop a mashup or a cool Forms picture viewer for his grandmom.

This approach has a serious drawback. Because programmers don't have to invest upfront in learning these APIs (instead relying on code generators and other tools/constructs), there is no incentive to learn the basics well. So, when something breaks, or if a programmer wants to do something that the API designer didn't anticipate, he is left high and dry, because he hasn't made the investment in knowing what is happening underneath.

In addition, many crucial features are provided as random attributes or "facts you need to know". Therefore, the transition from a novice programmer to an intermediate one is accomplished by increasing your vocabulary, something developers aren't comfortable doing (I mean, if you could remember things instead of having to learn them, why would you take up computer science instead of history?) Of course, you can turn to your favourite search engine for help, but many times, that isn't sufficient.

The other aspect I've recognized is the preference given to large, monolithic APIs and heavy integration. Of course, it serves Microsoft well to have its tools and APIs jell with each other, but the heavy levels of integration (think for instance, an ASP.NET grid view) and monolithic APIs end up leading to an all-or-none approach that developers are forced to choose between. Customization is next to impossible, and important aspects of the code get hidden from the developers leading to performance headaches and again, maintenance nightmares as the codebase evolves.

I'll update this post as I think of others.

API headaches

As a programmer, you sure have your favourite API-thrashing story. You know, the one where a destructor fails to release memory held by the object, causing an innocuous leak that is only caught when a million-dollar contract is at stake. The one where you need to call a function twice to use it once. And the one where you sacrifice your types at the altar of someone who thought it would be fun to use void pointers in a public interface.

API design is notoriously difficult. This paper says why. Suffice to say that the task of balancing conflicting requirements, for instance, of power v/s ease-of-use, along with constraints imposed by the target language, by the large (unknown) user base, and of issues like maintainability, extensibility, and performance - you have hell on your hands.

Still, I can't help but wonder why the APIs I use on a daily basis have the flaws they have. Why, for instance, does the Linq Aggregate function throw an InvalidOperationException when I pass an empty list to it. Why, for instance, the DateTime class does not comment what its MinValue is, beyond saying that it is public, static, readonly, and is the minimum possible date. Why, for instance, should the Enumerator be modified to check for end-of-container.

I have similar problems with some language features. The illogical distinction between structs and classes in C#. The whole mess created when operator overloading (specifically, op ==) meets reference equality.

I'm just venting. The C# language and the .NET runtime have amazing utility for programmers and have replaced native C++ as my choice of programming language.

Saturday, June 28, 2008

The nuclear deal

So, what do you need to know about the nuclear deal (I won't call it the Indo-US n-deal), to support or oppose it? Very little, actually. All you need to know is that three parties are opposing it - Pakistan, China and the Indian Communists. If these three oppose the deal, you know it is good for the country. You know you should support it, and support the PM, who finally has got a spine, after four pointless years in power.

Beyond the legalese and all the wrangling, what are the commies worried about? Well, as one worthy said: "The deal will make India a US outpost against China." Now, is that necessarily bad? Wouldn't you sup with your enemy's enemy, just as China has done with Pakistan, Bangladesh, Burma, and is now trying to do with Nepal? Why shouldn't we be a thorn in the flesh of the country that invaded us, still holds on to large tracts of our territory, refuses to acknowledge international borders it shares with us, and let's face it, is our competititor in every field of activity?

Incidentally, when was the last time you heard a left leader or that bastion of leftist writing, The Hindu condemn Chinese intrusions into our territory, or Chinese support for Pakistan's missile and nuclear programs, or even their attempts at encircling India with military outposts? What you've heard, I'm sure, is opposition to India's friendship with the US, opposition to India's relationship with Taiwan (which we still don't recognize, btw), or with India's friendship with Israel. In recent times, the communal nature of the Indian communist was also revealed when one of their general secretaries commented that the Indian Muslims were against the nuclear deal. What better example of ghettoising, generalizing, and internationalising an already targetted community?

However, the biggest farce in the whole drama is the one enacted by the BJP. In sacrificing national interest for petty bragging rights, L K Advani has shown that he's learnt nothing from being Vajpayee's right-hand in the government for six years. Shame on you, BJP, for calling yourself a nationalist party.
It is not Hindu fundamentalism or Islamic that pose India's biggest threat. That 'honour' goes to the commies and the pinkos of the country.


Saturday, June 21, 2008

Teen pregnancies. Updated

Read a Rediff article on the same topic:
http://www.rediff.com/money/2008/jun/23mrv.htm
Recently, there was this item in the news, where a group of seventeen "yet-to-turn-16" high school students made a pregnancy pact in the US, and succeeded. The reason? Well, the insidious effect of the coverage that celebrity pregnancies got in recent times. If you keep glorifying unmarried, under-aged pregnancies like that of Britney Spears' sister, and you keep pointing cameras at celebrity pregnancy bumps - what would you expect kids to learn?

A friend of mine who's into fashion, once told me how new fashions were invented. According to him, there weren't many avenues left for creative expression in clothing. So, designers had a choice - either they could drag themes back from the past, or they could shorten or lengthen existing clothes. He gave a very insightful description of how thongs were invented, but in the interest of your stomach, I'll let it pass. Anyway, what was even more interesting was their promotion strategy, which was two-fold: get celebrities to endorse the design, and demean those who stick with existing ones. For instance, to popularize women's pants, they'd associate it with feminism, so that anyone who didn't wear them, wasn't with the times, and was therefore, a supporter of male chauvinism. Similarly, to sell over-sized clothes, you glorify pregnancy, make motherhood the in thing for the times, get celebrities to advertise their pregnancies, and make a quick buck.

Now you know where I'm going with this line of argument. The loonies who control the fashion world, the loonier celebrities who model for them, and the still loonier media that covers these like there is no tomorrow - these are flooding adolescent minds with a steady supply of utter crap. Add to it, declining family cohesion, and the obsession with adultifying our kids to the point that 10-year olds start dictating their parents, and you have situations like the ones Massachusetts is trying to grapple with. With an underdeveloped pre-frontal cortex, adolescents who are not in a position to make sound judgements, are ruining their lives and the lives of others, causing serious harm to the health of a society.

Scroll your favourite maps to India. We have a similar recipe brewing in our midst. Will this soup turn as sour as that of the Americans?

Money v/s Work

Folks who are in the IT field are lucky, in the sense that we are paid well to do something we(hopefully) love. At least, me and many of the people I know in the industry enjoy our work - and some of us do "dream in code". Choices we've made in life would reflect this - we've picked quality of work over money or other considerations, we've always strived, maybe imperfectly, to reach perfection in our work, and we've put team goals above individual monetary gain. However, a question has been bothering me for a few months now: is there a time in life when you should give in, and start looking at the other side of the equation seriously?

It's not that I'm underpaid, or that I feel I don't make enough to sustain a good standard of living in today's Bangalore. But, as you grow older, and hopefully become more mature, you start asking yourself the tough questions, and that is when money comes into the picture.

When I joined my current organization, I took a big hits both in terms of salary and in terms of promotions and 'career growth', all for intellectual and academic growth. Recent developments have made me realize that the compromise on conventional 'career growth' is not a one-time affair, but is something that I'd have to accept as being a long-term phenomenon. As my senior in the org pointed out, I'm now trying to straddle two different boats, and with both pulling in different directions, there is a definite threat of me falling in between. Since one of the boats, that of academic growth is not a very viable option, maybe it is time that I bit the ಕಬ್ಬಿಣದ ಕಡಲೆ and made the switch.

What do you think? Let me know :)

Monday, June 16, 2008

The limits of freedom of speech and expression

Time and again, I've argued on my blog that free speech is absolute, and that the state or "society" has no business setting limits to the right of freedom of speech and expression. However, I must admit today, that there are limits to those rights.


The first limit is accountability. If you are making a statement, you should be willing to be held accountable for its consequences. Anonymous character assasinations are not covered under free speech. Nor is "hit and run" - false accusations, and change-of-topic when someone responds to a point you made.


Second, is preaching violence. Asking someone to kill, rape or maim someone in the name of religion, caste, ideology or any other fault-line.


The reason I'm pointing it out is because I've been reading some anonymous blog posts about a wing of my organization (search for "minimsft" on your favourite search engine), and the shameless way in which, without responsibility, people have proceeded to character-assasinate senior execs in the company. I'm not saying that the senior execs are all dyed in white (which they might be), but if you are making personal, imbecilic, and crude attacks on someone, the least you can do is identify yourself, so that the victim can respond with appropriate action.

Saturday, May 31, 2008

Yeddy, Reddy, Chaddi, and Gaddi.

So, Yeddy has finally gotten his Gaddi with the help of Reddy and Chaddi. While it means a lot for the BJP and for Yeddy himself, I'm not sure that the message is totally positive for Karnataka. Yes, it is a landmark verdict, and the Karnataka voters have largely done the right thing, ridding ourselves of the Devegowda clan's shenanigans, albeit only temporarily. And while this blog welcomes the new government and hopes that it delivers, it remains unconvinced that the rule of the BJP will actually make a difference for the state or for Bangalore.


Yeddyurappa's own shenanigans at the Vidhana Soudha today - conducting a 6 hour Hindu ritual in what should be a secular seat of power, doesn't give us much hope.


Earlier, Yeddyurappa agreeing to break away from the BJP and begging the Gowda's to give him chief ministership, doesn't give much hope either.


Nor does infighting in the BJP over ministries, nor the fact that the Mining Reddys who spent over 60 crores in this election will demand their pound of flesh.


In today's "ವಿಜಯ ಕರ್ನಾಟಕ", ಪ್ರತಾಪ್ ಸಿಂಹ (who is fast becoming my favourite columnist) wrote about the the damage that Yeddy's 'dream budget' has caused to the Karnataka finances. Now, I'm one who says that there is no reason for governments to turn in surplus budgets when farmers are committing suicide, or when large parts of the populace still remains illiterate. However, hand outs are not the answer to the problems facing the electorate. Yeddy doesn't seem to have the mindset required to really bring in the required change. For Bangalore, it is doubtful if Yeddy will override his partymen and restore the BATF.


However, the government hasn't even started functioning, so visit this space in a year for a proper review!



Postscript: This election has really been a mixed bag. While I'm glad that the Gowda family is not in a position to influence the government, and am glad that people like Dharam Singh, the Bangarappa family, and Bangalore's very own Vatal Nagaraj were shown the door, I can't help being sad that an excellent MLA and corporator like K. Chandrashekar (Congress, from Basavanagudi) lost. It is also tragic that the fascist Congress high command overruled its MLAs to deny Siddaramiah the opposition leader's post, instead giving it to a spineless Kharge.

Saturday, May 24, 2008

Racism, pigmentism, communalism

Racism: Why is there such a controversy over the racism (it is really pigmentism* - discrimination on the basis of skin colour) issue in picking cheerleaders (or in asking some of them to leave)? There is already discrimination (let's call it sizeism) in cheerleader selection - why is it that you don't find a fat cheerleader? If your sales item is a body - let's be frank about this - then you have to accommodate the fact that a majority of the people have a certain taste there. In the west, people think thin is sexy. In India, we think white is sexy. Why is one necessarily worse than the other? 'Equal opportunity' does not work everywhere.

I'm not saying that pigmentism or racism is OK in any domain. I'm only making the point that when you are selling beauty, you can't blame people for having a particular taste and for your marketers to cater to it. I've seen casteism and pigmentism at work in my previous company, and believe me, it sucks, even if you are not at the receiving end of it.

Communalism: You may recall how Manmoron lost his sleep when he came to know Indians were involved in the Glasgow blasts, and how (correctly) his 'secular' government fought tooth and nail to get him acquitted. Now, Indian cab drivers are being attacked in Australia, and these are racist attacks, why is the moron silent? Which cat has got his tongue? Why isn't there at least a demarche issued to the Australian mission in India? Well, if you didn't guess it already, it is because the victims are Hindus. If Muslim Indians were targetted, our secular government would have jumped into the fray - now, if a few dozen Hindus are killed out of the 850 million or so around the world, why bother?


* Thanks to a journalist friend for coining the word.

Sunday, May 18, 2008

Blatant International Airport Loot Ltd.

For nearly three months now, lunch discussions in my organization have revolved around the new airport. Last week, I got a chance to preview it first hand - BIAL has a "scheme" to allow MNCs to take teams of employees for a visit, and I signed on. So, what is my conclusion?

As passengers take the first flight out of BIAL, the taxpayer will be taken for a ride.
(Disclaimer: I don't know anything about running an airport, so things may be radically different once the airport actually opens.)

The reason is simple: the airport, particularly the terminal, is not designed to handle anything more than the traffic that HAL airport used to get in the early 2000s. It is tiny, particularly in comparison to what was expected of it. Terminal size of 71,000 square metres is dwarfed even by the Hyderabad airport at 105,300 square metres. And the PR folks at BIAL have the nerve to claim that they can handle 11 million passengers every year, while HIAL with nearly 50% more area claims a modest 12 million. HIAL beats BIAL in aerobridges: 12 to 8, and even in terms of runway width, which our host at BIAL acknowledged is insufficient to handle A380s. The person in question even claimed that no airline was ordering A380s in the near future, saying "why dedicate capacity to something that won't happen in the near future" (paraphrased). Apparently, he hadn't seen this: http://www.livemint.com/2008/01/13235805/Kingfisher-doubles-A380-orders.html, or a million other news items easily accessible from your favourite search engine.

We continued discussions about the airport, and he said that in Phase 2, an identical terminal would be built, taking the total capacity to 50million passengers. Now pray, according to BIAL numbers (which I completely reject), their terminal can handle 11million passengers. If you double of the area, what pot must you be smoking to let you quintuple the capacity!? When we entered the departure area, we were told that the seating could accommodate 1200 passengers, which was definitely a stretch of the imagination. Still, assuming that it can, let's examine the reality. A quick look at the departures from Bangalore between 8:00 and 9:00 PM reveals that there are around 20 flights taking off between those times. Taking a simple number of 70 passengers per flight, we have 1400 passengers. Similarly, peak hour international traffic happens between 00:30 and 2:30 hrs. Anyone who's taken an international flight during those times will testify that the cramped HAL airport had over 1000 passengers during those hours. So, we've already exceeded capacity! How will the airport handle traffic growth, which currently is at 20% per annum?

Now, this is not an accident. Ever since its inception, BIAL has refused to acknowledge the need for higher capacity in the airport, quoting dubious studies, while ignoring the ground reality - 10 million passengers took off last year - and the new airport is claiming to accommodate only 11 million (which, I'll bet is a total lie).

Let's now take a look at its finances. Are the user charges of BIAL, currently at Rs.675/- for a domestic passenger and Rs.975/- for an international passenger are too steep?

Here's a back-of-the envelope calculation. Taking an average charge of Rs. 700 per passenger, and with today's passenger numbers of 10 million per year - we get a figure of 7 billion rupees, or 700 crores as revenue from the measure. The total investment made by the partners is:
  • Rs 375 crore from Karnataka Govt (32.6%)
  • Rs 379.5 crore from Indian financial institutions as debt (33%), and
  • Rs 51.42 crore from the three member international consortium of Siemens Project Ventures, Larsen & Turbo and Unique Zurich Airport
Which means at nearly 900 crores expenditure, the airport venture will break even in the first two years of operating! And without _any_ increase in passenger traffic! OK, they have to pay salaries, there are running costs and utilities, but I haven't considered the revenue they will make out of the airport city, the planned "five-star" hotel, and from all the retail outlets that will be setup in the airport.

In addition, the airport will not allow KSTDC taxies to operate in the airport - what'll become of the livelihoods of those drivers?

These are the issues that Kiran Mazumdar Shaw, Mohandas Pai, and the rest of the rabble rousers must raise. Not travel time to the new airport.
On a final note: we went when there was less than two weeks for the airport to open, and finishing work was still on at the airport. Think about it, this is an airport that the company claimed was ready to open on March 31st! Looks like Mr. Brunner has learnt some Indian habits during his long stay here!


Postscript: It is a shame that none of the channels or the newspapers that covered the airport controversy bothered to present a statistical analysis of the airport, instead relying on sound-bites and "feelings". This points to a drastic reduction in the quality of journalism caused by the increasing numbers of those who come in for the "cool"ness of the job, not its rigor. Few journalists today are trained, or are willing to train, to achieve the analytical rigor that a Sainath, a Shourie or a Gurumurthy have achieved.

Wednesday, April 30, 2008

Freak-o-name-ics

I was trying to clean up my e-mail a few days ago, when I came across a bunch of e-mails sent by my friends who had just named their children. Now, each generation goes through a different trend of "name choosing". For instance, around the time I was born (will keep both the decade and the year a secret :)), one fad was to name kids after communist leaders. So, many kids were named after Stalin, Lenin, Marx, Che Guevera, and similar leaders. Another was to name kids simple, non-godly names. So, out went the Gopals, the Krishnas, and the Ramachandras, and in came Anils, Sandeeps, and the like. My good friend, (who shall remain unnamed) once told me that in the 70s, there was a movement, not just a fad, amongst Indian Christian families to give their kids Indian names. So, out went the Johns and Michaels, and in came Ajits, Ajays, and the like.

Freakonomics writer Steven Levitt talks about how so many people decide to name their kids using similar "principles". He shows that educational levels are a factor. As are income and upward mobility. (I would go on about this, but you should simply read his book. It is AWESOME.)

A trend I observed in the recent times, particularly amongst my friends, relatives, and distant relatives, is one where they name their kids names starting with the letter "A". Anwesha, Anahita, Anagha, Arya, Ankita, Anandita, Anusha, Apoorva, Ananya, Ayush, to enumerate a few. I wondered, Freako-style, why this was the case?

One answer seems to be that there is a trend, particularly amongst the IT folks, to use Sanskritized names. Maybe, it gives an impression of being in touch with Hindu tradition - imagine, someone asks your kid's name, and you say "Anwesha", you can be sure that the next question will be, "oh, what does that mean?", giving you an opportunity to show off your knowledge of ancient Hindu names. :) Or maybe, just maybe, people tried reading Maneka Gandhi's book of Hindu names from cover to cover, and couldn't get past the letter A! :)

Well, I pitched this idea to a couple of colleagues, and one of them responded: "Maybe the names start with A because they want their kids to become accomplished researchers, and become first authors of every collaborative paper they write!". [Editor's note: If a paper has nearly equal contribution from all its authors, the accepted "policy" is to put author names in ascending order of either their first names or last names.]

So much for working in a research lab! Well, what do you think?

Sunday, April 27, 2008

How to become a hero?

So, you are a politician and this is election year. You've done nothing towards solving big ticket problems in your constituency, or ministry (if you are a minister) for the last four, and now people want to know why they should elect you.

What do you do? Well, simple. You find a trivial issue, sensationalize it, and pretend to solve it by victimizing someone.

Let's see some examples. Our health system maybe in shambles, we may have 74 children out of 1000 dying below the age of five (27 in China), 0.8 beds for 1000 people (2.38 in China), 47% of our children are underweight (10% in China), only 42% of births are attended to by qualified personnel (70% in China), and...well, you get the picture. But our do-good minister of health affairs is not interested in these numbers. After all, how can you explain to the electorate that the number of hospital beds is now 0.82 per 1000 - how will they understand? Instead, you can wage a jihad on something visible - cigarettes, for instance. Not satisfied with banning smoking in movies, and not satisfied with having large skull-and-bones pictures put on packs, our worthy minister even tried to edit old movies to remove cigarettes from them! Luckily, saner minds prevailed. Next, the minister targetted alcohol - the no.1 cause for malnutrition deaths, high infant mortality, and maternity deaths. Now, he is targetting junk food - your next meal at Mc Donalds might actually come with a lecture on good eating habits! Or, the next time you buy a can of saturated fat, you could be made to attend a refresher course on the evils of cholesterol.

Anyhoo, another candidate in this space is the most cultured home minister of Maharashtra. Now, I don't know much about Marathi culture, but if you believed the minister, it would mean antagonism towards bargirls, towards cheerleaders, and towards "modern" clothing, while turning a blind eye to the violence perpetrated by goons supporting one political family. It would mean supporting weird notions of Marathi pride, including burning books written on Shivaji - who in his time, established a kingdom of tolerance and respect. It means targetting the innocent, and letting the vile go scot-free.

India, my friends - the latest "super-power".

Tuesday, March 25, 2008

National mess

I was watching "Chak de India" yesterday, with the book "Billions of Entrepreneurs" by Tarun Khanna in my hand, while simultaneously flipping channels to get a glimpse of a debate of sorts about Indian hockey. The movie is awesome, and is right up there with the classic "Remember the Titans", but that is not the subject of this post.

It just struck me that in the same month as the national animal is found to have suffered it's greatest loss of numbers, the national bird lost two dozen individuals and the national sport faced its worst defeat ever.

The conclusion is clear. Anything that gets tagged as "national" in our country goes to ruins. Readers that are old enough might recall the obsession with the electronics industry in the 80s. It was given "national importance" - which led to its suffocation. Programmes like Garibi Hatao that grabbed national attention were a disaster, as were attempts at "nationalization", banks, for instance, forgetting the customer completely. No one watches the national channel (DD-1) unless they are forced to, the national games are a sleight of hand, and our national interest is discarded at the bidding of opportunistic politicians, the nuclear deal being a good instance.

Similarly, our national song is submerged in controversy, our national flag represents how shamefully we allow differential treatment of our citizens, and those who give up their lives for their national cause are treated shabbily.

Is there a silver lining in the national cloud? Probably. Why don't we nationalize garbage? That may cause it to disappear. Or make corruption our national pastime? We could also try making our politicians national animals - they might go extinct then!

Any other ideas?

Sunday, January 27, 2008

The case for India

This is the title of Will Durant's awesome book on India. As I mentioned in my earlier posts, I've been reading a lot of India books lately, and this one is probably the last on the list. Written in 1930, the book, banned by the British government, and God knows why, never resurrected by the Indian governments, is an excellent account of how the country was raped, with the connivance of our own people, for over 200 years by the British.

The figures are amazing. Robert Clive, the resident governor of Bengal, getting an annual tribute of US $140,000, in 1930s money. The national debt of India, which was really caused by twisted pricing of goods, rising to a whopping 3.5 billion dollars by 1929, the cost of maintaining the British army in India was paid by Indians, to the tune of 200 million dollars a year, wars, in which Indian troops fought for the British were paid by taxes on Indians, to the tune of 1.2 billion dollars in the late 1800s, all of these reducing India from the second largest economy in the world in the 1820s to a basket case by 1947.

The book talks of how Indian industry was broken and how farmers were driven to penury in supporting the opulent lifestyles of company and British officials. What is more shocking is the kind of torture inflicted upon the common men by the British:

"A troop of English soldiers had reached the spot, and without warning, began firing into a crowd that had women and children. [...] Some people got as many as twenty-one bullet wounds in their bodies. [...] A young Sikh boy stood in front of a soldier and asked him to fire at him, which the soldier unhesitatingly did. Similarly, an old woman [...] came forward, was shot, and fell down wounded. [...] The police snatch off the men's garments, twist and squeeze the testicles, and even batter them until the victims foam at the mouth and become unconscious."

Madeline Slade, an eyewitness, says: "And so we went on from this house to another. [...] 1.Lathi blows on head chest, stomach and joints, thrusts with lathis in private parts, tearing off loin cloths and thrusting of sticks into anus, dragging of wounded by legs and arms, beating them, throwing of wounded men into thorn hedges or salt water, thrusting of pins and thorns into men's bodies..."

What stands out in the book are these:
- The extent of torture and exploitation of the British
- Active connivance of Indians in the British services, including the police force
- The bravery and determination with which "ordinary" Indians fought for freedom.

After reading this though, I started to wonder. As a country, we have such a poor sense of history. Our Moronic PM, intoxicated by a doctoral degree, praises British rule. Common people have no clue about how we won our freedom. Even educated people think the positives of India are the grace of the British.

Read this book. Buy this book. At 140 pages, it is not a long read. And let me know, if like me, you kept wondering whether we have simply replaced a white brute with a brown one after Independence.

Happy Republic Day folks!

Saturday, January 26, 2008

Can't dynamic languages scale?

See this: http://www.manageability.org/blog/stuff/chandler-failure

BTW, if you don't know what Chandler is, ask for my copy of "Dreaming in Code", by Scott Rosenberg. It is an amazing read, and a must for any software engineer.

If cabin crew were replaced by autodrivers.

Last Tuesday, I flew to Hyderabad to attend an "Advanced C#" course. My flight from Bangalore was scheduled during the evening rush hour, and we spent nearly 20 minutes at the edge of the runway, waiting for planes to land before we took off.

As I saw the planes land in a single file in front of us, a sinister thought entered my mind: "What if we removed all cabin crew and replaced them with Bangalore auto drivers?"

Well, at first, my plane would have made a mad dash to get on the runway before the last plane landed. We'd have the sight of two planes rushing in a V to get to the lone aerobridge (domestic) in the airport. Cabin crew would snort and turn their heads if you asked them which flight flew to your destination. Your onscreen monitor that shows remaining distance and time would be tampered, and your credit card deducted by amounts much more than the advertised "fare" when you flew.

Oh, in mid-air, pilots would refuse to continue to your destination unless you paid extra.

What else do you think would happen? Use the comments field below.
Postscript: Kingfisher airlines now has a fuselage mounted camera whose footage shows up in one of the inflight channels. Guess what the camera caught on the Hyderabad runway, just as we were about to take off? A couple of dogs taking a break from their rounds of the airport! And the AAI Hyderabad employees have the nerve to protest against the closure of the airport, stating it is against public interest! What do these worthies know about the public?!

Thursday, January 17, 2008

Star gazing on a cool January night

If you didn't know, winter is the best time for star gazers in India. The nights are cool, the sky is cloudless, and throw in a new moon night and a power cut - you have a star gazer's paradise. Turn to the north, and just above the horizon, you see the pole star - our own Dhruva taare. A little away, the Saptarshi mandala or the Big Dipper. Turn your head 90 degrees and you see the brightest object in the sky, Venus, and as you reach the perpendicular, the belt of Orion.

When I was eight (or maybe seven), the science club in my locality got hold of a telescope. Boy, were we addicted!? Every night in winter, we would go up the stairs of my friend's place, position the telescope and keep watching. Of course, the telescope was a manual one, which meant that if you didn't look through the lens in 30 seconds your star was gone (due to the rotation of the earth). We had a pair of binoculars that we could look through, star charts for reference, and even a powerful torch to point at a particular star. To add to our viewing pleasure, the Karnataka Electricity Board (as it was known then) turned off power for half-an-hour at night everyday.

Today, I spent most of the late evening gazing at the stars, and trying to recollect names for them. The pleasure of lying down on your back gazing at the sky has to be experienced to be believed. No wonder early men thought stars were night-time landmarks created by God. Just seeing the stars twinkle away as newer and newer ones grace the skies every minute is simply overwhelming.

Unfortunately, the city has grown so much (particularly towards the north) that many stars that graced the horizon are no longer visible. Maybe one can get a better view from a place like Nandi Hills...hey, I can drive!

Sunday, January 13, 2008

What is so great about Python?

No, I'm not making a statement. I'm asking a question. What is so great about Python? I made some faltering attempts at learning it, mostly through reading the O'Reily book, "Learning Python" and experimenting with some trivial programs.

So, what makes Python so great? Of all the answers I've heard, the most irrelevant and pointless answer seems to be the significance attached to indentation. Apparently, unlike other block-structured languages like C, Python has no delimiter to demarcate the start and end of a block. So, a program that looks like:

if ( x == 0 )
{
    printf ("This is crazy\n");
}

would be transformed into:

if ( x == 0 ):
   printf ("This is crazy\n");

Apparently, the founder of Python was so frustrated with the poor indentation that many C programmers use that he decided to make indentation a significant aspect of the language. So, why should I, someone who always cribs about other people's poor indentation styles, have a problem with it?

Well, simply because this is a fascist solution to a simple problem that can be solved by a keystroke or a command (depending on your environment). We don't need a language to force us to do this, in the process causing more problems than it solves. Think for instance, you are looking at a 1000-line Python file, and accidentally you hit a tab or a space. A 'worthless', 'invisible' token like whitespace will now give you logical nightmares!

Any other features that are useful?

Saturday, January 12, 2008

The GOD delusion

Update See Dawkins at TED: http://www.ted.com/index.php/talks/view/id/113


"The God of the Old Testament is arguably the most unpleasant character in all fiction: jealous and proud of it; a petty, unjust, unforgiving control-freak; a vindictive, bloodthirsty ethnic cleanser; a misogynistic, homophobic, racist, infanticidal, genocidal, filicidal, pestilential, megalomaniacal, sadomasochistic, capriciously malevolent bully.”


These are words of Richard Dawkins - author of the "best-selling" The God Delusion. I've mentioned previously about my appreciation for Dr. Dawkins' work - notably, The Selfish Gene. The God Delusion is another classic from his pen. An extremely provocative book, The God Delusion continuously challenges believers of all kinds to justify to themselves their religious values. Why, for instance, do we accept a God that asks for human sacrifice? Why do we accept a God that tells us not to seek the truth?


Richard Dawkins was a good friend of another great author: Douglas Adams of the Hitchhiker's guide fame. Both read each others' books many times, and Richard Dawkins gave Douglas Adams' eulogy. Both were(are) atheists. For instance, do you remember this line from the Guide?


"And god disappeared in a puff of logic."

Unfortunately, in the real world, there doesn't seem to be an end to people who would go on believing in the falsehood that there was a God that created us. Some would still believe that the Earth was created in six days, some others may believe that the Earth is only 6000 years old. Well, this is a book worth reading, irrespective of whether you believe or you don't. Dawkins tends to rant a little bit every now and then, but he has kind words for India's founding fathers, believes that the creation of Pakistan is a classic example of the trouble religion has caused, and most importantly, presents a very convincing argument for why we don't need religion.

Read it.

Sunday, January 06, 2008

Who is racist?

http://www.smh.com.au/news/cricket/a-class-act-opinions-differ/2008/01/04/1198950076545.html?page=3 : A piece from the 'secular' Australian media.

And a good riposte: http://content-ind.cricinfo.com/magazine/content/current/story/329291.html

Harbhajan is banned on no evidence, every Australian is let off - Sharad Pawar, if you have an iota of shame, bring the Indian team back home.

Disaster at Sydney

I'm writing this post even as the Sydney disaster is unfolding on my television.

We've all seen how eight to ten crucial decisions have gone against the Indians. We've seen how the 14-member Australian team (Bucknor, Benson and the third umpire forming the new 'tail') has taken gamesmanship to new levels. We've also seen how unsportsmanly Ricky Ponting and his men have behaved, particularly in the fourth innings of the test.

Those interested in cricket history will know that this isn't a first for the Indians. Repeatedly, repeatedly, the Indian team has been at the receiving end of umpires, match referees and other officials.

What is most shameful, however, is the reaction of the Indians, in particular, Kumble. Every time things have gone against India, the players and the BCCI haven't protested. Other than the Mike Dennis incident, umpires, match referees and other officials that have been unfair towards India have gone scot-free. Like in this match. There hasn't been a single word or protest. This match should have been nullified. It should not go into the record books, for the sheer lack of any cricketing law being in operation. But who is taking cudgels on the Indian team's behalf?

This is a test that a rising India will face repeatedly. Questions will be asked of India's determination, not just in cricket, but in politics, defence, economics - to do the right thing. Questions will be asked that will require firm, hard answers. Every nation that aspires to become a sporting, economic or political power faces these: China, on the question of Tibet, Sri Lanka, on the question of Muralitharan's bowling, or the US, on the question of terrorism. Nations that succeed give the right answers, remembering that there is a thin line between churlish protests, and just, effective ones.

India, unfortunately, isn't one such nation. We will burn Mike Dennis effigies, maybe shout from the rooftops about trade barriers, and put our collective heads into the ground when China sets up military encampments in our territory. However, we'll refuse to lodge protests against unfair umpiring, we'll refuse to use our clout in the ICC to get rid of referees and umpires that are against us, while not thinking for a moment in manipulating the system to get a Dalmiya or Sharad Pawar into the ICC chairman's post. We'll let countries like Bangladesh walk all over us, not just in World cups, but also on the borders.

Dhimmitude: something India has honed into a fine art.

(On an aside: There is a small distinction between cribbing and complaining. Kumble did the right thing by not cribbing about lack of match practice after the Melbourne debacle. But not complaining about third-rate umpiring? That too after 8-10 abysmal decisions?)


(Aside 2: I wonder how the Dhoni/Yuvraj/Deepika thing is working out. First, Dhoni walks the ramp with her, is impressed, and invites her to watch him play. Then, the lady in question arrives, rejects Dhoni and 'elopes' with Yuvraj. Now, Yuvraj and Deepika are an item, and with them setting off the 'snoops' in all Sydney restaurants, what is the state of the relationship between Dhoni and Yuvraj?)

Tuesday, January 01, 2008

Ideology-oriented programming

Move over, object-oriented programming. Say goodbye to aspect-oriented programming. Bid farewell to the argument between imperative and functional programmers. Godspeed, Noun oriented programming.

All hail, Ideology-oriented programming. Yes, IOP, the latest kid on the block is taking the world by storm, and if you are unaffected by it, you should be ashamed.

What am I ranting about? I forgot!!! Visit this space for an update.

Of love, leagues, and relationships - 5: Ineffectiveness.

Previously in "Of love, leagues...":
Arthur looked longingly at the perspective gun. Does he dare do it?


Arthur looked around. The cubicles at work were buzzing with activity. No one was looking at him or at Trish, as he called her now. He took aim, the black of her eye settling in the middle of the crosshairs of the perspective gun. An instant later, Trish wobbled, struck by the megamillion Boules of power (brain-joules). Steadying herself, she gave Arthur a look that only she could. Full of hope and fear, Arthur gazed at her quizzically.

"What did you do that for!?", Tricia asked, dusting off Arthur's perspectives. "Why did you fire that thing at me!!!?"

Arthur was taken aback. Naively, he had expected the gun to work; for Tricia to understand how he felt, and reciprocate in some manner. But at the moment of epiphany, he realized he hadn't read the fineprint on the gun:

Not effective on women in love or labour.

The thought brought a wry smile on Arthur's face. Tricia is in love. Fate had just sent him a message. Heeding it, he turned to walk away, when Tricia stopped him. She had a melancholic look in her face. An empathy that only one rejected in love could muster descended on her eyes. Taking Arthur's hand, she said, "I know".

Arthur smiled. It was the end of the road for this fantasy, he thought. Determined to move on, he walked away, when his eyes fell on the e-calendar posted on a far wall.

It was two days to New samvat's, the festival that celebrated 60,000 years of human existence. This was big, and humanity had planned an enormous celebration. Would he be able to enjoy the day?



Sunday, December 30, 2007

Surfeit of India books

Somehow, in the last few weeks, 'India' books have been dominating my reading. I re-read Ramachandra Guha's "India after Gandhi", finished Shashi Tharoor's "The Elephant, the Tiger, and the Cell Phone", and am reading V Raghunathan's "Why are we the way we are", and have Edward Luce's "Inspite of the Gods" next on my reading list.


It's been fun. All the authors (ones I've read) love India. Their patriotism shines through every word they write. However, each book has a different focal point to its verbiage. Ram Guha's book is more political, placing emphasis on the political history of the country, focusing on personalities (and events) that shaped India, all the while making the point that India remains a single country because of democracy and the vast number of safety valves it offers.

Shashi Tharoor's book is better: the author has an amazing sense of humour, he is a great story teller, and this book is far more about ordinary Indians than Ram Guha's. Shashi talks about Bollywood, Cricket, Hinduism, Gavaskar, Ramanujan, rural womenfolk - in short, everything that makes India, India. I'll post a few snippets after I obtain his permission. But in any case, go read the book - it is a very easy, fun-filled and anecdotally-rich read, something you won't regret in the new year.

If the two previous books gave me a sort of a high, V. Raghunathan's "Why are we the way we are" brought me crashing down to garbage-ridden, potholed earth. In his book, Raghunathan examines, using Game theory, many aspects of Indian behaviour and concludes that our selfish desire to go ahead of our neighbours makes all of us poorer in turn. With lucid and contemporary examples, Raghunathan proves that the India would be a far richer and liveable country if only everyone lived by the rules, even if acting purely in self-interest. A chapter on the management principles of the Gita stoked my curiosity and I think I'll give the great book another read.

If you are Indian, or want to know about India, particularly why we tick (or barely survive), these books are a must read. If I know you, you have it easy: ask me. :)

Happy new year folks. Do keep reading and keep your comments coming.

Year y2008 = new Year( );

y2008.HaveAHappyOne();

Technology Notes, Vol 1, Issue 5: Software Engineering

In this issue of technology notes, we'll talk about the software engineering that you should have learnt in your Computer Science undergraduate degree.

Nearly every Computer Science course offers a software engineering subject, usually as a compulsory subject. Typically, topics covered include software development models, phases of development like design and testing, and an overview of common techniques in software development. This subject is usually boring - in fact, in "my time" it was so bad that we actually had a lecturer come and read to us from the text book. I mean, he literally read out the book to us. So frustrated were we at this turn of events that we actually forced him to stop, and suggested that we'd read up that stuff and present it ourselves. Which we did. And might I say, in good measure. However, our takeaway from that course wasn't much more than public presentation skills.

Which, in introspect is bad. Software engineering should be a part of the foundations of any computer science graduate. After all, if you are going to develop software, you should be aware of the techniques that the masters use. However, what the course teaches is not that. The course does not explain how masters develop software. It does not care about quality assurance processes; it doesn't care about real-world issues of large-scale software; the course does not introduce students to the complexities and pitfalls of developing a million-line C++ program. All it does is give keywords. CMM, Agile, Data-driven design, Top-down design, Waterfall, to name a few.

Hopefully, someday, we'll change this.

Sunday, December 23, 2007

Modi and Indian culture

I know, I know, what are the two doing together? Well, nothing. Except both happened today.
I'm no fan of Modi, or of the sort of politics he's accused of employing. However, what has always bothered me is the sort of campaign that has been going on against him. For instance, I distinctly remember the large-scale vilification that was started by some left-wing activists resulting in his request for a US visa being refused. I mean, you can't place the man in the same category as Saddam Hussain, Polpot, and the like! Yes, he fiddled when Gujarat burned, and that is a crime, no less, and if he is found guilty, he must be punished severely - but how are his accusers, one who talked about large trees falling, and another who was proud of how his boys killed dozens of Muslims to 'takeover' a village?
If Modi has really done the sort of development that he claims to have done, this victory is well deserved and is a slap of the face of the pseudo-secularists, the media and the left intelligensia.
Many of you might have watched the long series of dance programmes on the various regional channels, including Sony, Gemini, Star Plus, and the like. What has bugged me, and in fact, the incident that prompted me to write this post is the so called children's competitions that these channels conduct. The children gyrate their hips, making the most decadent moves on screen - and this is not limited to girls only - many of the moves the boys perform are not those I'd want my kids (if I had any) to watch! This is shameful - how can parents let their children dance to such steps?

Wednesday, December 05, 2007

On Disability

[Posted using Microsoft Live Writer]

Recently, I read this article in the Deccan Herald in which a former bureaucrat in the disability department of the state government talked about the duty of the civil society towards the disabled. It burnt me up so much that I HAD to write a riposte and bingo, it was published, though in the process, the editors destroyed the intent of my letter.

Anyhoo, if you are interested,

here is the original article:

http://www.deccanherald.com/Content/Dec32007/editpage2007120239060.asp

here is the letter that got published:

http://www.deccanherald.com/Content/Dec52007/editpage2007120439402.asp

Here is what I actually wrote:

This is in response to Mr. B C Pradeep Kumar's article "Disability and good governance" in the Deccan Herald (DH, 3rd Dec 2007). While Mr. Pradeep Kumar rightly points out that much more needs to be done to bring people with disabilities into the mainstream, he is barking up the wrong tree as far as solutions are concerned.

Let's examine what the state has done for the disabled. Yes, we have reservations for the disabled, and maybe the budgetary allocation has far exceeded the national capita, but what concrete difference has it made to the lives of the disabled? Of what use is budgetary allocation on paper when the disabled don't have ramps to climb into the buildings where they can claim those allocations? Of what use is reservations, when the physical access to the job/education is impossible? Roads in Bangalore are a terror even for able-bodied people - how are the disabled expected to cope? How is a poor, disabled person expected to travel to work, given that even the state road transport organization isn't disabled-friendly?

It has become a hallmark of those in power to talk about lofty principles, on-paper budgets, and commissions that do nothing. What they never had is the empathy or the will to do something, something small that would make a huge difference. Mr. Kumar's article is in the same vein. Programs, Commissions, lofty talk, but no action. The observant reader would note how none of the "progressive" steps he mentions includes basic needs like disabled-friendly footpaths, ramps in public buildings, disabled-friendly buses, and the like. That is the unfortunate reality.

Saturday, December 01, 2007

Nostalgia: Radio

I have been trying to find a line to start this post, but every line that came to mind turned out to be more corny than Sushil Doshi's commentary on DD. Anyhoo, I wrote earlier about 80s television and comics, this time let's talk about Radio.

When I was a child, the radio had the place in the home that the television has today. I don't remember listening to a lot of radio, but I do remember the radio we had - an old GE vaccum tube behemoth that HAD to be connected to the mains to work. The radio broke quite often, generated a lot of heat when it operated, and was quite a sight in our "showcase". Still, my folks loved it, and whenever it broke down, I used to get a lesson in solid state electronics by observing my brother attempt to fix it. It is another matter that the repair sessions also included lessons on the fragility of glass, but they were inadvertant, and will be part of another story.

As I said earlier, I don't remember listening to a lot on this radio - except ofcourse, the 1983 world cup - I was six years old then, and wondered what all the brouhaha was all about, but there was a lot of celebrating and I definitely, had to be a part of it.

My trysts with the radio began when my brother bought a radio with his first salary. It was a neat red-and-black Philips radio that ran on 4 Eveready batteries. A few years later, he bought home a 2-in-1, and that was when the fun began! Every day, we used to listen to "Bhoole bisre geet", "Geet mala", "Aap ki pharmayish", and the likes, and recorded casette after casette of songs. I still remember the announcers say: "Bhatapara se munnu, chunnu, rinki, pinki Andheri se pappu, jhappu, teena, meena, and so on...". A few days ago, I came across a tape on which I had recorded "Yeh Aankhen dekh kar ham saari" and man, did the memories bounce back?


Tell me your memories using the "Comments" link below.
(PS: I finally found that Bhatapara is a suburb in Raipur, Chattisgarh.)

The Taslima story

All the shock and awe over the Taslima story would not exist if only one knew the "Unit of Freedom" of Indian democracy. When the foundation of your democracy is based on the freedom of the Indian people, and NOT the Indian person, and when the foundation of your democracy is the freedom of the mob, you cannot expect that democracy to provide freedom of expression to the individual.

So, to all those comperes who ask the Mullahs and Maulvis angry questions: Look at our constitution. See how it proscribes, in the same breath, the right it gives us. That needs fixing, not the Maulvis and the Mullahs.

Sunday, November 18, 2007

Boys, Girls and Science

Many studies have been conducted on this topic. Many philosophers have wondered why this is so. Many academicians, and academic communities have racked their brains to solve this "problem". What am I talking about? Well, it is the differing interests of men and women (or boys and girls) with respect to science.
Why indeed, 5o years after the gender equality movement, has the ratio of male to female physicists, or mathematicians not changed? Why is it that despite desperate attempts, particularly in the US, not enough women graduate from technical fields? Also, on a complementary note, why is women's enrollment in computer sciences so high, particularly in comparison with other fields in India?
Well, the answer is simple. Evolution has trained women to value social status over academic achievement. Evolutionarily, it was better to be the mate of a high-ranking man than be a brilliant hunter yourself. This guaranteed success of the off-spring, as the man's success determined that of the household.
Now things have changed. However, evolutionary habits die hard. Most women still prize social elevation over everything else. Note the qualifier: "most". There have been (and are) many women who prize academic achievement. But they are the exception and not the rule. So, bottom line, women will go to a field that will enhance their social standing. And for most of them, that is simply what their peers think is nice, or what the men of the day perceive to be "cool".
So, why hasn't women's enrollment in technical subjects increased? Because technical subjects are not perceived as being "cool" in the US. Why is women's graduation rates in technical subjects so low? Because they want to be socially elevated, not academically. And more controversially, why do women flock to computer science courses in India? Because that is the route to social elevation in this country.
Remember that most women who actually get into technical fields in this country rarely stay in them. Even if they do, their levels of accomplishment, in understanding and furthering the field are minimal. [Again, this is true of most women, not all.]
So, why am I ranting about this at 12 midnight? Because I'm fed up of people "encouraging" women in the software field by ignoring similarly qualified male candidates. It hasn't worked, it won't work. Those women who are really interested in getting on the software bandwagon will not need a ladder for it. And those that do, most probably, won't do much getting on the bandwagon.

Technology Notes, Vol 1, Issue 4: Machine learning.

This week, I'll write about my experiments with time, my thoughts on Machine learning, and a little bit of evolution theory.


* The speed of time
As I was writing my earlier post, "Nostalgia :80s", I kept thinking how time has flown since that time. Well, yes, but how fast does time really fly? I thought a while, and came to the conclusion that it is c. The speed of light. The speed of time should be the same as the speed of light.

What proof can I offer? Well, we know that nothing can travel faster than the speed of light - and time travels pretty fast -so, the speed of time must be c.

On a more mathematical basis: we know that t(v) = t(0) sqrt ( 1 - v^2/c^2). Therefore, when the observer reaches the speed of light, time stops. This means, that the relative velocity of the observer and time is zero - which means, v(time) - c = 0, or v(time) = c.

* The problem with Machine learning

If you are working on speech recognition, face detection, natural language processing or an other field that essentially tries to mimic the functionality of the human brain, you'd probably be using machine learning. Machine learning is the sort of intersection of the human and the computer - a science where humans tell computers how to learn based on vast amounts of solved problems. The deductions made are usually based on sound statistical methods, details of which are available at the wikipedia page.

The technique has taken huge strides in areas such as face detection, speech recognition and machine translation. However, complete success eludes it. Why?

My opinion is that the technique is trying to solve the problem by breaking it into parts, while the problem should be dealt with, at a holistic level. For instance, your brain interprets the whole image, while programs interpret colour encoded as bytes. Or does the brain really interpret the image as a whole? Hard to say. But it appears to be so - it can "understand" that a brightly lit part of a metallic object that reflects large amounts of light still belongs to the same object. It can filter a speaker's voice from the noise in the environment, almost automatically. It can translate sentences between languages taking care of ambiguities in tense, grammar, and meaning.

It'll be interesting to find out if this is really so.

* More choice isn't necessarily good

Don't believe me? See this ad for Vista choices: http://www.youtube.com/watch?v=PxLgBx3W9Ss. The sad thing about it is that it is really true. Recently a friend was making a movie in Windows movie maker and wanted to tweak a few settings. He was using Vista Enterprise, and this option - a single menu item that is default with Windows Movie Maker on XP - is available in the Home Preminum (and Ultimate) edition! How on Earth has choice helped the user?
See this talk for a more scientific explanation.

* On evolution

As some of you know, I've been reading a lot of Richard Dawkins of late. I've also been "evangelising evolution". In the process, I found that most people have misunderstandings about how the process works. This is a small attempt to clarify some of them.
  • First, evolution to create the present set of species has taken millions and millions of years, a time frame most of us cannot fathom.
  • Speciation (or the development of a new species by evolution) requires a separation between members of a species and a separation of their environments .
  • Evolution is occurring even today: Why do mosquitoes become resistant to DDT? Why do we need newer and newer strains of antibiotics? Why indeed is the AIDS virus so successful at avoiding every medicine we throw at it? Well, the answer is just one - natural (or in this case, human) selection. When we spray DDT or take antibiotics, we target and kill most mosquitoes(bacteria) in the environment. However, the few that due to some mutation survive, being selected by human selection, have the upper hand in reproduction, and spread the immune gene throughout the population, making the entire population resistant.
  • Evolution does not happen only by random events: It is indeed true that a hurricane blowing through a garage of aeroplane parts will not assemble a Boeing 747, and it is true that random mutations on their own will not lead to speciation. However, random mutation in combination with non-random natural selection, that selects the fittest, either by killing off the weak, or by having mates choose a particular trait in the other sex.

Have been reading too much evolution. I hope to start reading more Physics from now on. Keep visiting!

BTW, I know my "speed of time" hypothesis is wrong, and if it isn't, I take no credit for getting it right. It was just a random thought that popped into my head.

Congrats, Anil Kumble!

Better late than never. Better safe than sorry. Similar cliche's would've come to your mind when you heard that Kumble was made Indian test captain.
It may be a stop-gap arrangement, but it is still welcome. For nearly 18 years, Kumble has silently toiled for the country, bowling 50+ overs on a trot in test matches, getting the crucial breakthroughs, and even hitting a century when it mattered.

Congrats Kumble. It couldn't have happened to a more deserving bloke.

Sunday, November 11, 2007

Nostalgia: the 80s

Recently, I was talking to a couple of colleagues when the topic of comics came up. In an instant, we connected over some familiar, but old names: Phantom, Diana, Flash Gordon, Mandrake, Bahadur, and Bela, to name a few. We also talked about their relationships - for instance, being Indian, Bahadur and Bela were _never_ introduced as a couple. They were "friends" who were planning to get married.

This took me on another nostalgic trip. To the times when the world was a lot more innocent than today. When a Ramayan would empty city roads, or when the only movies shown on TV were on Saturday and Sunday. The news ran everyday at 7:00 and 8:30 in the evening. Everyone saw the same programme, mostly on a black-and-white TV. Your TV was usually a Dyanora, or an ECTV, or a NELCO (which was mine). Families gathered around to watch a Buniyaad, or later, an Oshin. A 2-in-1 was a major purchase. Radios and TVs were taxed. I still remember the license my folks had taken, to own a RADIO - not a station!

In all this, my favourite TV serial was "Johnny Sokko and the Flying Robot" or "Giant Robot" as we knew it. This huge robot, controlled by a little kid, was so popular with us kids that we literally dropped everything - cricket bats, gillis, badminton rackets, chur-chand balls, marbles, even stones - to go watch this series. The next day, everyone would be doing the routine - the arms in front of the chest, then pointing upwards, followed by the "rap pa pa" tune, and flying away! Yeah, yeah, I know you want to see it too - here you go: http://www.youtube.com/watch?v=vY0e3aTj3pQ&feature=related

By today's standards, the graphics was crappy, the animation dodgy, and the story lines were like a three-year-old wrote it. Still, we loved it. It was every boy's dream - an adult who would do his bidding! :)

See this for some more memories: http://indrajal-comics.blogspot.com/
http://www.vishalpatel.com/

Sunday, October 28, 2007

Arrrrrrrrrrgh!

My blog is rated "G"! Can you believe it!!!?

dating

Free California Personals

"My" product released!!!

I'm a little late on this, but a product I worked on has been released by HP in their 11iv3 version of HPUX, in Feb 2007. Why did I find about it so late in the day? Well, I no longer work for HP, and I don't have many chatty, reliable sources in the company either.

Anyhoo, this was a project I joined, one that I led, one that I spent sleepless nights on, and one in which I had great fun. EMT, or Error Management Technology as it is formally called, is an online, searchable, updateable repository of error messages and associated cause/action information. It isn't very big, probably a hundred thousand lines of C++ source, and is a part of a much larger toolset called System Fault Management, or SFM, another project I contributed to.

The reason why I care about this project is that my team went through hoops trying to finish it. We had uphill struggles all the way, but we came through them, mostly successfully :), with the most harrowing experience being what we called the JOEM release - a pre-release version of the product that was supplied to Japanese OEMs. We scored a 4 on 5 for the product, and most of the objections they raised were minor, and were mostly features of the larger SFM toolset.

The joy of seeing your work in the public domain can never be sufficiently expressed in words. It is a thrill ride beyond thrill rides.

See more about EMT here. And remember, I did _not_ write the documentation.

Monday, October 22, 2007

Carbon dating.


Recently, I've been reading a lot of books on evolution, and carbon dating is one topic that occurs every now and then. So influenced have I been by the process that I had to put it down in some form. Here goes:


BTW, the tagline for it is: I feel I've known you for a million years!!!

Sunday, October 07, 2007

Confidence

What is the most appealing characteristic in a person? For me, amongst the things you can discover at first sight (so, it obviously rules out characteristics like honesty), confidence is the most appealing. I'm sure it is the same for many other people. But here is the question...why?

Let me admit at the outset that I don't know. Maybe because it conveys a sense of fearlessness. Maybe because confident people appear intelligent - particularly in one-on-one interactions. In general, confident people are also usually more convincing. Imagine if Winston Churchill, instead of saying "We'll fight them on the beaches, we'll fight them in France..." had said "um...er...we'll try and fight them on the beaches...er...maybe, try and fight them in France...er..." - would it have had the same electrifying effect on the Britons? Confident people do have a reassuring halo around them...

Interviews are an instance. Except for some utterly obnoxious candidates (my former co-interviewers will testify to having seen many such) who simply cannot backup their confidence, confident candidates do get away with an awful lot.

Coffee table discussions are an other. Time and again, I've been flummoxed by engineers who spoke total B.S, but spoke it with such confidence that my time-tested knowledge (of a very few things) just gave up! Recently, I got into an argument with a colleague about Java v/s C++ performance. As long as we were discussing, he almost had me believe that Java memory management is better performing than that of C++. It took me two reads of his source, a read of the programs mentioned by the source, a few tests, and another paper reading to re-realize what I knew all along - that his source was bunkum.

The point I'm trying to make is the importance of knowing that confidence does not come only from being right. It also comes from not knowing that you're wrong.

A lesson I learn everyday.
(Postscript: While on this topic, I'm one of those guys who thinks that Java can never beat C/C++ in a fair test, but one who also believes that a fair test isn't really possible. We'll always end up comparing apples and oranges. Java has a lot going for it, and it should just leave the performance bit to the Cexperts.)

Thursday, October 04, 2007

OneNote is all you need

Yep. Read it with the "One love is all you need" tune. Nope. I haven't become a fan of "Blue". And yep, OneNote is a Microsoft software which does all you need.

For sometime now, I've been cribbing about usability of Microsoft software, particularly once you take into account how much it costs you to own them. I also have a slew of drafts lined up for you, all criticizing various aspects of Microsoft software, from Vista to Visual Studio. I had earlier cribbed about tables in Word - how you have to pre-create them, and you cannot simply tab your way into creating them. I also cribbed about how you cannot mix content the way you like, how you cannot search into content (images) and so on.

Well, OneNote is here. And really, it is all you need. OneNote lets you put text, handwriting, images, music - and here is the differentiator - where ever you want. Really. And It Just Works! In addition, most content is searchable. Even your handwritten text, or printed text in images. And searchable. And it integrates with Outlook. And you can make sections, pages and the like, as you need. And you have a shortcut in Windows that pops it up for you to take notes when your idea ticker starts to work. And you can tag things, make items in OneNote become Outlook reminders, and in short, do everything you need.

Try it out today - http://office.microsoft.com/en-us/onenote/default.aspx?ofcresset=1. This is one software, I'll bet, that will win, well, your mind!

Sunday, August 26, 2007

Underworld

If you are a pre-history buff like me, you'd have wondered what explains the sudden appearance of agriculture, brick buildings, stone masonry and indeed, language and culture in the 4000-5000B.C era. How is it, that agriculture started simultaenously around 4000BC in places as far away as Sumer, the Indus-Saraswati valley and Japan? And if you are interested in mythology, you'd wonder about the persistence of an all-consuming mega-flood that is supposed to have ended known civilizations in Hindu, Sumerian, Judeo-Christian myth, as well as in the story of Atlantis. The flood in which India's Manu, Sumer's Zisudra and more popularly, Israel's Noah constructed arks or boats that protected important knowledge and lifeforms during the flood, and released them again to recreate and repopulate the Earth. You'd have heard of theories that extended from the bizarre (alien contact that gave humans technology) to the plausible (sudden inventions that changed lives drastically).


And finally, if you are interested in Indian history, you'd wonder about the Aryan invasion, about Sanskrit's European origins, and the reasons behind the downfall of the Indus-Saraswathi civilization.


Well, after a long while, I finally started reading the book "Underworld" by Graham Hancock, and it makes a very serious attempt to provide some answers. Using inundation maps of the last Ice Age (wiki, video, earth info), Graham examines the truth behind the various myths. For instance, underwater stone blocks have been found off the coast of Gujarat at the location where the mythological Dwaraka was supposed to exist. According to the sea depth, and inundation maps, Graham estimates its date to be around 7000BC, far earlier than the 4000BC when Indian civilization was supposed to have started. Making use of various geological techniques that predict three super-floods at various ages, Graham makes the case for a single or many post-Neolithic civilizations, that built these (now underwater) cities, that were ravaged by floods caused by the Last Global Meltdown. For instance, it is a theory that the Hudson bay in Canada was a freshwater lake during the Ice Age, whose walls broke down to release millions of kilometers of freshwater into the Atlantic, around the same time when Plato said that Atlantis sunk. With critical looks at underwater, overland, mythological, cartographical and scientific evidence, Graham propounds his theory - that the Pyramids of Egypt, the Stone henge of England, the drainage system of the Indus valley, Siva worship in India, the Vedas, all evolved either at a much earlier time than accepted today and/or were preceded by a period of learning that is lost to us today.

A good read. Although at 700+ pages, it is quite long.


Sunday, August 19, 2007

More on India@60

Earlier on this blog, I wrote that the reason India has stayed together as one nation is democracy. Today, I'll try and refine my reasons some more, and hopefully knit a better weave of the country's unity.

One reason why people of different religions, languages and castes live together in India is because your primary identity can be anything while you can still be an Indian. Consider the case of Pakistan, that split over language or Sri Lanka that is fighting an ethnic conflict whose roots are in language. Now, Tamils and Bengalis are in India. Why is it that they don't want (at least a majority of them don't want) a homeland carved out of India?

It is because the aforesaid countries supressed those languages, discriminated against those who speak those languages - all in the name of national unity. If speaking Urdu became the "Tabbott test" of being a Pakistani, where would all the Bangla-speaking citizens go? If being a Muslim is the definition of being a Pakistani, where can all the non-Muslims go?

When the founding fathers of India rejected the idea of India being a Hindi-speaking, Hindu Pakistan, they knew what they were doing. When Nehru conceded the demand for linguistic states, much against his ideas, he knew that Newton's third law of every action having an equal and opposite reaction applies as much to politics as it does to physics. Which is why, India is a country that does not react to the veils worn by Muslim women (like in France) or the Kirpans worn by the Sikhs. We have learnt that a truly secular state that values freedom of expression, also allows religious expression. We have learnt that the best way to make Hindi a link language is by not forcing it down people's throats (the UPSC for instance, conducts its exams in 18 languages, a record anywhere in the world), but by enriching Hindi with so much content (works of Gulzar, for instance), that it becomes irresistable. And we've learnt, sometimes painfully, that patriotism has nothing to do with being a Hindu, or speaking Hindi or even being religious. Consider for example, the case of our Lok Sabha speaker, who is a firm atheist. You don't find anyone contesting his patriotism!

What is the root of such tolerance? Or maybe tolerance isn't the right word - it should be acceptance. Why is India a country that accepts everyone? Is it a product of the freedom movement, or is it even more deeply rooted? I'll examine this in my coming posts.

Stay tuned.

If only women ruled the world...

The one line every feminist loves. Talk about anything that is wrong in the world, and whenever you have a feminist in the audience, this is a line you'll hear. If only women ruled the world, there would be no conflict. If only women ruled the world, disputes would be solved over shopping trips and not through wars. If only women ruled the world, there would be no global warming. And no endangered species. And no poverty. And no inequality. And no world hunger. And this world would be a happy, bubbly, green, lovely, peaceful place to be in.


Pointing out that the record of women rulers doesn't really justify this claim never helps. It only marks you out as a male chavunist, a wife (or girlfriend)-basher, a neanderthal, and in general, a jerk who doesn't deserve to be in the modern age. Pointing out that the only prime minister to impose the emergency in India was a woman, doesn't help. Pointing out that the most dictatorial leaders in the country are women - Jayalalitha, Mayawati - to name a few, doesn't help. All you get is the standard response - these women have to behave "like men" because there aren't enough women around. Oh, and the 33% reservation for women is going to fix this problem.

A recent report by CNN-IBN on ragging in colleges has shattered this myth. While the instances of ragging in boys were terrible, they were only as bad as those committed by women. See, for instance, the story of Indu Antos, who committed suicide after being ragged by her (female) seniors. Now, in a group where women are in a majority, why is a fellow woman being harrassed to the point of committing suicide?

Now, I'm not making the claim that men are all non-violent, and peace-loving. My only claim is that positions of power - whether it is obtained through politics, or by means of being a senior, or through other means - corrupts, and it corrupts people who are susceptible to it. Men and women are equally likely to be infected and this is entirely an individual's characteristic, not that of a gender. Having women in positions of power is no guarantee that either the lot of women will improve, or that the lot of the world will. What is guaranteed to happen is that the lot of the women in power will improve.

Maybe that is a cause worth fighting for.

Sunday, August 12, 2007

Missing the golden oldies

One huge tragedy of LPG (Liberalization, Privatization, Globalization) has been the loss of a wonderful singing tradition, particularly of patriotic songs. The crap that circulates today in the name of patriotic songs simply makes one hang his head in shame. I don't want to grant them respect by mentioning them here, but suffice to say that they are nowhere in the class of the golden oldies that Rafi and Manna dey, with Lata and Asha breathed their voices into.



For instance, take the song "Kar chale hum fida jaan aur tan saathiyon" - rendered in Rafi's immortal voice. One line of the song goes thus: "Kat gaye hamare sar to kuch gham nahi, sar himalay ka hamne na jukhne diya" Or the ever melodious Manna dey singing the soulful "Aye mere pyaare watan" in which Gulzar mourns "Chood kar teri zameen ko door aa pahuche hai hum. Phir bhi hai yehi tamanna teri zarron ki kasam - hum jahaan paida hue us jagah hi nikale dum" - can you resist getting goosebumps? Or why, a little Asha singing Kavi Pradeep's "Jis din teri chita jali thi roya tha mahakaal - sabarmati ke sant tune kar diya kamaal." (When your pyre was lit, even fate cried, O saint of Sabarmati, you did a miracle.) Or the 1940s song "Aaj himalay ki choti se phir hamne lalkaara hai - door hato door hato door hato aye duniya walo hindustan hamara hai". (Today we've given a clarion call from the Himalayas - quit, you foreigners, Hindustan is ours.)



The lyrics, the music and the singing of the time all combined to give a surreal feel to these songs. Sixty years after independence, someone born thirty years after the day can still feel the sentiment of the freedom movement. That was the greatness of the era - the songs tugged at your heart - not at your purse-strings.



Will those days come again? Or will the next generations grow up on utter crap like "It happens only in India" or "Sandese aate hai" and think they are great patriotic songs!?

India@60

So, yet another decade of Indian independence. What is so great about it, you ask? Few countries are under a foreign yoke anymore, many are doing so well economically and socially, with countries like China kicking our backsides when it comes to economic growth, poverty alleviation, and indeed any aspect of social or economic development. Our venal politicians and bureaucrats leave no stone unturned in shaming the country, while we grapple with problems of both the 18th and the 21st centuries simultaneously. Still, this is a day of celebration. Still, this is a day when we must be proud to be Indians. It is a day when we must stand up and say with a lot of justification "मेरा भारत महान"। Why? you ask. Why, suddenly, has Mr. cynicism become a patriot?



Well, one eye-opener for me was the movie "Sometimes in April" - a movie about the Rwandan civil war. There was nothing civil about it, believe me, and the Hutu attempts to wipe out the Tutsi was so blatant, that it shocked the living guts out of me. A million people were killed, nay butchered in three months - all because of racial difference. This got me thinking - what if we in India were to fight out our differences? What if we were to resort to genocide to flatten our linguistic, racial, financial ethnic, religious, casteist, pigmentist (thanks to a friend for this one), regional, tribal, sectarian, fault lines? How many civil wars would we have witnessed? How many millions would've died? What effect would it have had on the rest of the world, if a billion of its people fought like animals?



It is not that India has been strife-free! We have had riots, killings, revenge-killings, protests, and what not! Our history of 60 years has been blood-stained on many an occasion. Still, we remain as one country. Why?



Really, the only plausible answer seems Indian democracy. Even with all its warts, and all its deficiencies, democracy has given every Indian (well, truly speaking, every Indian mob) the freedom to shout, the freedom to block roads, to vent their anger, the freedom to stop trains, to mob people, and in general, do anything except secede from the Union. So, while the Indian individual is still deprived of the right of expression, the Indian mob, which really is the unit of most turmoil, is given a free reign, which allows grievances to be settled with that very typical Indian "jugaad". People therefore obtain a stake in the system, which allows it (and the people in it) to flourish, as our billion-plus population attests.



I remember, visiting Austria when I was working for a German software company. There, our counterparts (Germans and Austrians) quizzed us on what united India. I mean, the seven members in my team spoke a total of nine languages (Kannada, Hindi, Telugu, Tamil, Malayalam, Marathi, Oriya, Konkani, and English), we had representatives from two major religions, and were from five different states. So, why were we in one country? What made us Indian? I had no answer. I mumbled something about Cricket, and Bollywood, but I'm sure the Indian spirit goes deeper than that. So, while I investigate it, why don't you express your thoughts through the comments field?



Have a very happy Independence Day (in advance). Oh, and for the RNIs, just a reminder, the Indian Independence Day is on August 15th, despite Bill Pullman's exhortations to the contrary.

Sunday, July 29, 2007

Random thoughts

I haven't blogged in quite a while, and the best way to get back into blogging is by jotting down random thoughts, ain't it? Well, here comes another edition of chaos.

Why do we find it so hard to innovate?


I had lunch with a good friend of mine recently, and our conversation veered towards the lack of innovation in the company he works for(which incidentally was mine a year ago). We had some thoughts on the subject, and on my way back to work, I kept wondering why we didn't have world-class innovations from India, particularly in the software field in which we're supposed to be so strong. There are a few reasons we all know - don't we? As software engineers, we are trained to write software that implements a spec. We are trained to re-use, to borrow readily available code/design, and to think in patterns. None of which are characteristics that encourage innovation. There is also our education system, my favourite whipping boy for everything that is wrong in the software field. We are not encouraged to tinker, we are not encouraged to find our own answers - instead, we learn, by heart, answers handed down to us. What better way to kill the innovative spirit?

File your opinions through the comments link below.

The Ancestor's Tale


This is another "wow" book by Richard Dawkins. I'd read his Selfish Gene, Extended Phenotype, Unweaving the Rainbow earlier, and this is a wonderful progression of Dawkins' talent. The Ancestors Tale recounts the story of evolution, going back in time to trace the lineage of the human species. The book is full of facts, evidence, and anecdotes - not to mention the occasional funny diatribe against Bush, Creationists, and their ilk. As usual, Dawkins writes marvellously well, and while there are sections of the book that a non-biologist (me) may find tough to understand, they are well demarcated, and don't interrupt your understanding of the rest of book.

Dreaming in Code


I wouldn't have heard about this book by Scott Rosenberg if it wasn't for my favourite software blogger, Joel Spolsky. While Dreaming in Code is a biography of the Chandler project, it goes beyond just that, giving the reader wonderful insights into why Software is HARD. Why is it, that 50 years after the first high-level language was invented, we still don't have a language to convert requirements into code? Why is it that, 35 years after Dijkstra announced that the "Goto statement was harmful", we don't have a language that'll minimize logical errors? And why is it, to quote the immortal words of Fred Brooks, there is indeed no silver bullet in software engineering? The book revisits these questions, and asks a few more of its own. For instance, it questions the logic that software should be more like civil engineering, it describes the problem with leaky abstractions, and the undecidability of verifying software. While I don't want to say that it is in the same league as the Mythical Man-Month, it is a must read for every software engineer.
Here, I want to make a small point. Software development is about people. It is not all technology. It is about people deciding to do the right thing everytime they put their hands to the keyboard. It is about embracing quality - as Harsha Bhogle eloquently describes in this video. It is about perfecting the basics - remember the "wax on, wax off" lesson from "The Karate Kid"?
Tools can only help. Ultimately, software is all about people. While you are reading this, also take a look at code reads - the collection of trend-setting articles by Scott Rosenberg.

Sunday, July 22, 2007

Thank you, Dr. Kalam

Folks, it is official. The cunning descendant of Mussolini has had her way, and Dr. Kalam is out of office. This post is just a dedication to his abilities, his turning the presidency from an institution of pomp to that of the people, and his integrity, good judgement, and tireless efforts towards an India that'll make us proud.

Good luck, sir, for all your future endeavours!