Friday, April 13, 2007

Throw the beloved to the crocodiles

Those of you who are from India or Pakistan must have heard Baba Bulleh Shah's poem 'Piya Ghar Aaya'. Bulleh Shah wrote in Punjabi, so the lyrics have been difficult for me to follow, and I had always wondered about the meaning of the opening line:
Ghariyal deyo nikal ni
The only gharial I knew about is an endangered crocodile-like reptile. Maybe the return of the piya (beloved) was creating too many complications and the poet wanted to set the crocodiles loose on him. Or maybe there was some deep Sufi symbolism involved.

As it turns out, Bulla was not a sociopath and there is no mysticism involved. The ghariyal in this case actually means the village watchman who beats his gong to mark the passing of the hours. The poet wants him sacked so that her (the poem is written in a feminine voice) reunion with her lover is not cut short by the coming of the morning. As one translator renders it:
Sack the gongman
My love has come home today.

He strikes the gong time and again
And shortens my night of dance and song
If he were to listen to me,
He would throw away the gong
Sack the gongman
An idea right after my heart. Let us sack all watchmen, throw away all alarm clocks, shut down all NTP servers, and give ourselves over to love.

But how come reptiles and watchmen have similar sounding names? The reptile part is easy. Earthen pots are called 'ghara' in many of the languages of the subcontinent, and the male gharial has a snout which resembles such a pot. About the watchman I can only guess. Maybe gharas with holes were used in water clocks, giving the name ghari to clocks in general, in turn leading to the person whose duty it was to announce the time being called a ghariyal.

What do you think?

Tuesday, April 03, 2007

Rubaiya is back

Rubaiya Bintenahar is coming back to the RG Kar Medical College Hospital, Kolkata to continue her studies.

Rubaiya is a third-year medical student who had been branded a witch and confined to her house in her village for 23 days. She had received psychiatric treatment earlier and a worsening of her condition was taken as a sign of possession by her father who brought her back home to be treated by a witch-doctor. After the story was picked up by the media, social activists and the administration convinced her father to allow her to rejoin her studies.

What I found really touching is the image (reproduced here) that accompanied the newspaper report. The man walking behind her with the heavy bag is identified as her father. He looks so much like the stereotypical protective father of a Bengali girl, carrying the heavy bag to spare his daughter. In the university where I study, every year at admission time there are some fathers like this who insist on checking for themselves whether the dormitory beds are soft enough for their darlings. Looking at this photo I cannot bring myself to believe that Rubaiya's father meant her harm. Yet, he treated her so cruelly.

Reminds me of the famous quote by the physicist Steven Weinberg:
Good people will do good things and bad people will do bad things. But for good people to do bad things—that takes religion.
Except that this time it is garden-variety superstition rather than religion which is to blame.

Friday, March 30, 2007

Sex is sexy, biology is not

Here is proof yet again that sex sells, and that it sells really well.

A few days back there were a lot of headlines about a creature which has not had sex for the past 100 million years. The creatures are the bdelloid rotifers, microscopic aquatic organisms whom no biologist has ever caught having sex. They are believed to reproduce asexually by cloning.

But all this is old hat, so much so that even a mere reader of pop-biology books like me knows this stuff. So why the sudden headlines? There hangs an interesting story about human culture.

The journal PLoS Biology, which is part of the admirable project of providing open access to scientific research, has a system of publishing popular summaries of important articles. On 20th March it published a summary titled 'Who Needs Sex (or Males) Anyway?'. The press and most of the blogosphere picked up the title and the first paragraph which mentioned asexual reproduction in the rotifers and ran with it. And in doing so it missed the real essence of the article, which was to study the meaningfulness of the species concept when discussing asexually reproducing species. If there is no sex to mix up the gene pool in each generation, then is it meaningful to talk of an species as an evolutionary entity? The paper show that at least for these rotifers it is. And that whether you use a certain quantifiable feature of the rotifers bodies to do your classification or you use DNA sequences, you end up with the same 'species' categories. That is what the paper is really about. Asexuality of the rotifers is something it uses as an established premise. Yet, that is what the media really picked up.

The right kind of sex life may or may not make you long-lived, but it certainly makes you popular.

In defense of the "100 million years of chastity" headlines, the asexuality of bdelloid rotifers does pose an interesting problem for evolutionary biology. It is generally believed that sexual reproduction and the recombination of genes it brings about is necessary to allow a population of organisms to keep up with changes in its environment. This argument appears to be supported by evidence which shows that while in the course of evolution different organisms have developed asexual reproduction, this trait has not survived for long.

Bdelloid rotifers throw a spanner in this neat story. They appear to have survived for millions of years by reproducing asexually and hence suggest that sex may not be really necessary for survival.

However the real twist will come if someone discovers that the bdelloid rotifers do have sex after all. This has happened before. Some other organisms which were early thought to be asexual are now known to reproduce sexually—the males were so insignificant that they had earlier been mistaken as parasites feeding on the females. The females of some other species may concur.

There goes the SC again

It is most unfortunate that the Indian Supreme Court has stayed the implementation of the new law providing for reservations in higher educational institutions for students belonging to backward castes.

The Indian constitution itself (in its Article 15) empowers the government to carry out affirmative action programs for "the advancement of educationally and socially backward classes". Thus the court could hardly question the constitutionality of the principle of reservation. Rather, it has based its judgment on the fact that the government could not provide any data on the backwardness of specific castes more recent than the 1931 census.

The court's argument is flawed because different provinces have regularly kept updating the list of backward castes which are eligible for reservation. Instead the court has turned this fact on its head by observing:
Nowhere else in the world is there competition to assert backwardness and then to claim we are more backward than you.
Of course there will always be attempts by the powerful to hijack and subvert any redistributive program. But this does not take away the fact that Indian society is highly unequal and that a lot of this inequality is caste-based.

Hopefully the Supreme Court judgment will cause the government to produce a well-researched survey of social backwardness in our country (just as the Sachar Committee did for the Muslims) that will put to rest once and for all the anti-reservationist argument that reservation for OBCs is nothing but pork-barrel politics.

And on one thing I think that the government is completely wrong: the issue of creamy layer. Deprivation in Indian society is not just caste-based but also economic and there is enough economically privileged people from the OBCs that it makes sense to have provisions for the exclusion of the creamy layer.

Free Shaquanda Cotton now!

Shaquanda Cotton is a 15-year-old Texas girl who has been in prison for over a year now merely for shoving a hall monitor in her school. Recently her detention has been extended for possessing 'contraband': a plastic foam cup and an extra pair of socks. Under the law she can be held in the detention facility for the next seven years—till she turns 21.

The same judge who sentenced her to imprisonment also let off a white girl found guilty of arson with just probation.

Here's the full article from the Washington Post.

Wednesday, March 28, 2007

Genealogical epiphany

A cousin can be defined as someone with whom you share a grandparent but not a parent.

Monday, March 19, 2007

Wikipedia watchlist as webfeed

UPDATE: The scripts mentioned in this post were not working for a while due to changes in the MediaWiki API (which is in alpha). They are now working again.

Wikipedia's watchlist feature just calls out for a RSS feed. Why should you have to keep checking your watchlist page, rather than being notified when an edit to a watched article actually occurs? Though the web interface to Wikipedia does not offer such a feed right now, all is not lost—Wikipedia has a not too well-publicized XML API which, among other things, allows you to log in and fetch your watchlist as a RSS/ATOM feed.

Here are two scripts that take advantage of this API: if you have Python installed and run an aggregator program like Liferea which lets you specify a local script as a feed source, then you can use this Python script by Jyotirmoy Bhattacharya; otherwise you can use Tim Morgan's CGI script, a copy of which he has kindly hosted on his own server (but be sure to read the caveats on his blog first).

Friday, March 16, 2007

Leo Tolstoy hated geeks and Germans

Tolstoy's heroine Anna Karenina, being a considerate hostess, tries to draw the geeky (and German) steward of her lover's estate into the dinner table conversation by asking a technical question. But, as many a geek has since discovered, the suits and gowns don't really want to know the answer.

Here's the excerpt:

"Have you ever seen a reaping machine?" she said, addressing Darya Alexandrovna. "We had just ridden over to look at one when we met. It's the first time I ever saw one."

"How do they work?" asked Dolly.

"Exactly like little scissors. A plank and a lot of little scissors. Like this."

Anna took a knife and fork in her beautiful white hands covered with rings, and began showing how the machine worked. It was clear that she saw nothing would be understood from her explanation; but aware that her talk was pleasant and her hands beautiful she went on explaining.

"More like little penknives," Veslovsky said playfully, never taking his eyes off her.

Anna gave a just perceptible smile, but made no answer. "Isn't it true, Karl Fedoritch, that it's just like little scissors?" she said to the steward.

"Oh, ja," answered the German. "Es it ein ganz einfaches Ding [It's quite a simple thing]," and he began to explain the construction of the machine.

"It's a pity it doesn't bind too. I saw one at the Vienna exhibition, which binds with a wire," said Sviazhsky. "They would be more profitable in use."

"Es kommt drauf an.... Der Preis vom Draht muss ausgerechnet werden. [That depends...the cost of the wire must be taken into account.]" And the German, roused from his taciturnity, turned to Vronsky. "Das laesst sich ausrechnen, Erlaucht. [It can be calculated, your excellency.]" The German was just feeling in the pocket where were his pencil and the notebook he always wrote in, but recollecting that he was at a dinner, and observing Vronsky's chilly glance, he checked himself. "Zu compliziert, macht zu viel Klopot [too complicated, makes too much troubles]," he concluded.

"Wuenscht man Dochots, so hat man auch Klopots [a man who wants troubles will also have troubles]," said Vassenka Veslovsky, mimicking the German. "J'adore l'allemand [I love German]," he addressed Anna again with the same smile.

"Cessez [Stop it]," she said with playful severity.

Anna Karenina is one of my favourite novels, but when Anna throws herself under a train at the end of the novel, I have one reason different from Tolstoy's to say:
Vengeance is mine; I will repay

Thursday, March 15, 2007

Sale! Sale! Sale!


Time for poor students of mathematics to be happy. Springer-Verlag is running its annual 'Yellow Sale' where you can get your favourite (and dreaded) yellow-covered books for upto 50% less.

I'm going to buy Arnold's Mathematical Methods of Classical Mechanics (the link is to Amazon, but they are not running the sale on their site; you will have to buy from Springer or one of their recommended booksellers).

Tuesday, March 13, 2007

Two stories of the Great Depression

Bonnie & Clyde is a cult movie—films as disparate as Oliver Stone's Natural Born Killers and our own Hindi Bunty aur Bubli claim it as their inspiration. But it is also an old movie. It was released in 1967, and today the age shows. The actors appears wooden, their mannerisms contrived, the violence that shocked original audiences so artificial. Its combination of gangster film, on-the-road movie and tale of star-crossed lovers may have been new then, we have seen it many times over since.

But what still made the film interesting for me was its social backdrop of the Great Depression. The Great Depression was an economic disaster of immense proportions for the capitalist world. In just the four years between 1928 and 1933 real per-capita income in the US fell by about a third—something very hard to imagine today when bad times for developed countries just means slower than average growth. At the peak of the Depression one of every five persons in the US labour force was unemployed. And what was really frightening about this disaster was that it was brought about not by war, natural calamity or some other destruction of the community's productive resources but by a breakdown of the economic order itself. Five decades after the Depression an economist could still publish a book with the title Can It Happen Again? and know that everyone would understand what 'It' referred to (the economist was Hyman Minsky).

It is this bleak world of the Great Depression that the Bonnie and Clyde inhabit. Just like the real-world bandits they are named after, Bonnie and Clyde rob banks. But in the Great Depression even bank robbery is not what it used to be. Clyde dashes into a bank building to find that it is just a dusty shell. The only employee there, who seems to have lost interest in everything, lets him know that the bank failed three weeks ago. Another daring bank robbery and dramatic car chase ends with robbers discovering that their bags of loot contain only a handful of notes. "Times are bad", Clyde says.

Times are worse for the poor. We see a family forced out of the farm which was their home because they could not pay their debts to the bank. We see encampments of the poor who are migrating across the country in search for work. And in true Robin Hood tradition, Bonnie and Clyde stand with the poor. They lend their guns to the dispossessed farmer so he can shoot holes in the sign that say that his home is now some bank's property. They rob banks, but let farmers keep their own money. They tell a bounty-hunting Ranger they have captured that he should have been back in his jurisdiction protecting the rights of the poor.

In turn, the poor help Bonnie and Clyde. We are told of times when the poor held up 'the laws' so that Bonnie and Clyde could escape. Again, when they are wounded and helpless, a camp of migrant workers feeds and helps them.

Here, then, is the chance of telling the story of Bonnie and Clyde as that of social rebels who represent the resistance of the poor. But keeping true to the Hollywood mainstream, Bonnie & Clyde gives this the go by. In this film, Bonnie and Clyde's sympathy for the poor is just noblesse oblige—the charity of the 'strong' for the 'weak'. They don't think of themselves as being one of the poor. Just the opposite. Their entire quest is to escape the ordinary life, to be somehow different.

The film shows this both implicitly and explicitly. The other members of the gang provide a foil to Bonnie and Clyde precisely by their ordinariness. The sidekick, C.W. Moss, is shown as not too bright and lacking in moral character. In the end, he betrays Bonnie and Clyde because his father tells him to. Blanche, Clyde's sister-in-law, is shown to be a stereotypical housewife who panics during gunfights and keeps talking about criminals "paying their debt to society" and yet demands a share in the gang's loot.

But even more revealing is the sexual tension that exists between Bonnie and Clyde themselves. The movie opens with a naked Bonnie banging her fists against the bedrails. She has a house and a job in the middle of the Depression. But she is frustrated. Because there is nothing for a waitress in a cafe in a small town to do but the "watch the grass grow". When Clyde shows up in her doorway trying to steal her mother's car, she is immediately ready to walk away with him. Seeing him rob a grocery store and steal a car gets her aroused. But then she discovers that Clyde suffers from some kind of sexual dysfunction. "I ain't much of a lover-boy", he says. She is about to walk away is disgust, but he shouts at her,
If all you want's stud service, then get on back to West Dallas and stay there the rest of your life!
This stops her. He promises,
We can be somethin' we could never be alone. I'll show you...when we walk into the Adolphus Hotel in San Antone', you wearin' a silk dress, they'll be waitin' on you and believe me, sugar, they're gonna know your last name.
And the partnership of Bonnie and Clyde is born. What wins her over is not any struggle against injustice but the promise of escape from a mundane life. In this Bonnie and Clyde is much more a film of 1967 than a film about the 1930s. For unlike the Great Depression, the sixties were a time when the capitalist economic system was doing very well for the developed countries, producing unprecedented rates of economic growth. It was also a period of social advancement for the people of these countries. Yet, it was also a period of great dissatisfaction, particularly among the youth, with the culture and politics of that time. It was the decade of student rebellions in universities, of rock and roll, of anti-Vietnam protests. And ultimately the spirit of Bonnie and Clyde is the spirit of this rebellion against the apparent banality of everyday life.

Near the end of the movie Clyde overcomes his sexual dysfunction. Bonnie and Clyde are together reading Bonnie's poem about themselves that has been published in the newspaper and then they make love. It is celebrity rather than liberty that finally is the turn on.

It is not my intention to belittle the rebels of the sixties. But if we want to understand why they could change so little, their failure to join up with broader sections of the people in their societies (except for a few occasions like France 1968) must be a large part of the explanation. And that brings me to the other story of the Great Depression from the title of this post—Steinbeck's novel The Grapes of Wrath. The social background is the same. But now the protagonists no longer stand apart from the people. They are the people themselves—the novel consists of chapters describing the conditions of dispossessed farmers migrating in search of work interleaved with chapters describing the travails of one such family, the Joads. And the struggle that moves the novel is not the struggle of finding a way out for oneself but the struggle for changing the conditions that make ordinary life so miserable to begin with. The novel has a tragic end, but the tragedy does not leave us hopeless. As one of the characters, Tom Joad, forced to go into hiding by the goons of the plantation owners, tells his mother:
“I'll be everywhere—wherever you look. Whenever they’s a fight so hungry people can eat, I’ll be there. Whenever they’s a cop beatin’ up a guy, I’ll be there . . . . I’ll be in the way guys yell when they’re mad an’—I’ll be in the way kids laugh when they’re hungry an’ they know supper’s ready. An’ when our folks eat the stuff they raise an’ live in the houses they build—why, I’ll be there.”

Saturday, March 10, 2007

Darwin for Godless Materialists

The fight that liberals in the US have to fight against the stupidities of creationism means that most books on evolution that are published in the US have to spend a lot of their time debunking creationism and explaining the plausibility of the theory of evolution. A reader like me, whose world-view does not depend on voices from the sky heard by people long dead, gets a little impatient. Hence the search for books that take the fact of evolution as generally accepted in the beginning itself and spend their time discussing its mechanisms and implications—fascinating matters about which there is still a lot to learn. My favourites among the books that do this are Ernst Mayr's What Evolution Is and John Maynard Smith's The Theory of Evolution.

Both authors are accomplished biologists. Mayr has made important contributions to classification and theories of species formation. Maynard Smith is a population geneticist who pioneered the application of game theory to evolution and came up with the concept of an 'evolutionarily stable strategy' which has since then been used by economists too. Maynard Smith was initially trained as an engineer but later switched to zoology because he decided that "aeroplanes were noisy and old-fashioned".

The two books complement each other very well. Mayr's is more introductory, giving you the broad picture. Maynard Smith goes into more detail about the population genetics and molecular biology involved. Mayr's vision is that of a field zoologist. He talks about the influence of the environment and macro-evolution. Maynard Smith's tells us the story of the 'selfish gene' with more rigour than Dawkins' famous book.

In short, two books that must be on the table of everyone who wonders how the "endless forms most beautiful" of living nature come about.

Friday, March 09, 2007

Can you split the CMS please?

A few weeks back I got my own domain name. I am planning to create a personal site where I can put up my working papers and code. Right now it is just a placeholder made up of a few HTML files that I have typed by hand. But the cutting and pasting is already becoming a maintenance nightmare. I want some system where I have to enter only the variable part of the content and the rest is generated automatically.

One system which I have looked at is the open-source content management system Drupal. There are lot of good things about it. The templates look slicker than anything that I could manage on my own. There are a whole lot of modules that deal with content management and presentation and even with such things as creating and submitting Google sitemaps. The process for creating new modules for things specific to my site does not appear to be too difficult.

There is only one difficulty. Drupal requires you to manage content by interacting with the live site. This leads to a number of problems:
  • Trying to have a separate staging site where I can edit and experiment with content before pushing it out to my live site requires ugly hacks to maintain synchronization between the two.
  • Given the nature of the content I am planning to put up, my final site would not require any complex dynamic machinery. Since it would be edited infrequently and I would be the only person doing the editing, having the content management system sitting on my local machine is not really a disadvantage. So, having to maintain a complex system like Drupal on a shared host seems like an unnecessary burden.
  • There is the security angle too. I cannot afford to pay for SSL hosting, which means that I am open to vandalism from someone sniffing my password. [Though the point is somewhat moot since the cheap webhosts that I can afford require you to update the site using FTP which is as vulnerable to password sniffing.]
Other popular open-source CMSs have the same problems. There are other programs like Tahchee and Rest2web which take templates and the description of a website in some 'high-level' form and generate static HTML. But from what I have looked at so far, they seem to be too restrictive for the type of site that I have in mind. Particularly their basic unit of organization seems to be a page, while I really like the concept in Drupal and other CMSs of the basic unit being an article with pages being created by selecting and organizing articles in various ways. And Tahchee etc. have no built-in content management, so you either have to keep hacking at unstructured text files or roll your own.

Like every amateur programmer, I am sorely tempted to do the last. I can feel it in me to write the next revolutionary CMS which will allow proper separation between the content and its management. Hopefully this mood will pass and I will find a tool that I can use.

If pigs can fly then my name is Midas

Economists speak a lot about something being a necessary condition or a sufficient condition for something else. So, for example, someone might claim that
a high growth rate is a necessary condition for eradicating poverty
How do we verify such a claim? One can imagine a diligent economist checking the data to see if every year in which poverty fell was also a year in which growth was indeed high. Only if she can find some year in which poverty fell and growth wasn't high that the claim is disproved.

[Of course, a real economist would have to use statistical inference here since there would be other factors assumed constant while making the claim but which would actually vary while making the observations. But let's ignore that for the moment.]

Now suppose I make the claim,
Pigs being able to fly is a necessary condition for my being able to turn lead into gold.
Our diligent economist once again gets ready, clipboard in hand, to check this claim. But day after day pigs don't fly and I can't turn lead into gold. If we use the same criteria as before, this claim can never be disproved.

We seem to have opened up a huge hole in our system of reasoning. We can claim "Pigs being able to fly" as a necessary condition for anything at all and our claim would never be disproved. In fact this property of the standard logical system is well known to logicians and mathematicians: one can prove anything starting from a contradiction. To put it in our terms, 'nothing' is a necessary condition for everything and anything is a sufficient condition for 'nothing'.

Is this really a hole? Suppose we were investigating the claim that "high growth is a necessary condition for poverty eradication". Imagine an economy where growth is low in some years and high is others but poverty decreases only in those years when growth is high. We would consider our claim to be true in such an economy. Since we did not demand to know the proportion of years in which growth is high while making this judgment, our conclusion should remain the same in the corner case where this proportion is zero and all years are low growth years.

So, if we were to meet an economist who prefaced all his predictions with "If pigs can fly then ...", it would be more consistent to think of him not as wrong but as irrelevant to our world where pigs don't really fly. To avoid falling into such irrelevance ourselves, we must be convinced that the conditions in which our predictions hold occur at least some of the time. Hence the importance of existence proofs in economics.

Of course sometimes economists who are in a hurry forget to establish the existence of objects that they are talking about. And then they can turn lead into gold.

Thursday, January 18, 2007

A Puzzle

From an interview with mathematician Vladimir Arnold:
You take a spoon of wine from a barrel of wine, and you put it into your cup of tea. Then you return a spoon of the (nonuniform!) mixture of tea from your cup to the barrel. Now you have some foreign substance (wine) in the cup and some foreign substance (tea) in the barrel. Which is larger: the quantity of wine in the cup or the quantity of tea in the barrel at the end of your manipulations?
Arnold is strongly opposed to the Bourbakist style of teaching and doing mathematics. About puzzles like this he says:
Children five to six years old like them very much and are able to solve them, but they may be too difficult for university graduates, who are spoiled by formal mathematical training.