Tuesday, February 22, 2011

February 22, 2011

This would be funny if things weren't so serious (from Gaddafi's thug of a son's speech; italics mine):
Before we let weapons come between us, from tomorrow, in 48 hours, we will call or a new conference for new laws. We will call for new media laws, civil rights, lift the stupid punishments, we will have a constitution. Even the LEader Gaddafi (sic) said he wants a constitution. We can even have autonomous rule, with limited central govt powers. Brothers there are 200 billion dollars of projects at stake now. We will agree to all these issues immediately. We will then be able to keep our country, unlike our neighbors. We will do that without the problems of Egypt & Tunisia who are now suffering. There is no tourism there. We will have a new Libya, new flag, new anthem. Or else, be ready to start a civil war and chaos and forget oil and petrol.
What a tool.

Meanwhile, there is talk of blond women snipers in Tunisia. Scary stuff.

Via Reddit: The hero of Bahrain. Effing bastards.

Wednesday, February 02, 2011

February 2, 2011

I came across this op-ed on the revolutions sweeping across the Arab world via The Deccan Chronicle. It tries to make all the right noises and strike the right notes, but doesn't really cut it. Question for the author: any reason why Jordan, Saudi Arabia and Kuwait don't find a mention in the list of autocratic regimes? Wait, I guess I have my answer:
Hussain Abdul-Hussain is the Washington correspondent of the Kuwaiti newspaper Alrai.
Not to mention that this appears in The New York Times/IHT.

Thursday, January 20, 2011

E Coli

Man, the E Coli bacterium is one versatile thing. Not only can it serve as secondary storage in a computer:
E. coli gets a bad rap – probably due to the violent illness it induces – but a group of Chinese University students in Hong Kong have found a novel and potentially reputation-changing use for the bacteria: data storage. The team has devised a way to encrypt and store information in the DNA of bacteria to such an effective degree that they say just one gram of E. coli could store the same amount of data as 450 two-terabyte hard drives.
it can also produce oil:
In September, a privately held and highly secretive U.S. biotech company named Joule Unlimited received a patent for “a proprietary organism” – a genetically adapted E. coli bacterium – that feeds solely on carbon dioxide and excretes liquid hydrocarbons: diesel fuel, jet fuel and gasoline. This breakthrough technology, the company says, will deliver renewable supplies of liquid fossil fuel almost anywhere on Earth, in essentially unlimited quantity and at an energy-cost equivalent of $30 (U.S.) a barrel of crude oil. It will deliver, the company says, “fossil fuels on demand.”

Sunday, December 26, 2010

December 26, 2010

The Economist has an insightful article about life in Shahabpur, a village in Uttar Pradesh -- the caste dynamics, how well (or poorly) its residents are adjusting to the changing times, and so on. A positive article overall, the frequent references to the villagers' open-air toilet habits notwithstanding (what's with all the "turd"s?). A couple of choice cuts -- one an open admission of corruption by the person working in the village ration shop (What was he thinking? Anyway, he can always claim that his words were mistranslated if the authorities try to prosecute him for this):
Mr Lal, who is popularly considered to have the best job in Shahabpur, also admits to skimming off a share of the loot. He puts his pilferage at a modest 2kg of rice for every 52kg-sack he handles. “I’m only paid 900 rupees a month, so of course I have to steal!” he explains.
and the other a poignant and pathetic story of justice denied:
Two months ago, while Sarju was visiting his parents in Madhya Pradesh, his 13-year-old son Ravendra was beaten senseless by two patel neighbours. The boy had skinned and dumped a buffalo carcass, from which a dog took a meaty bone into their field. Ravendra, who carries scars from this beating, was discovered by the local skin merchant, who informed the local BSP partyman, who reported the matter to the police. They took no action. Yet this flicker of official interest in their plight represents significant progress for Sarju and his family.

Friday, December 10, 2010

December 10, 2010

A surprisingly mature response from our government, when compared to the hysteria in the States over Wikileaks (italics mine):
Some of those conversations with politicians, industrialists and others have been leaked to the media and have been reported on widely. The government has also said that while the leak should be investigated, it cannot stop the media from publishing transcripts of the conversations on the leaked tapes.

Sunday, November 21, 2010

This and that

First off, the new Airtel logo: whoever the ad agency is, they made a killing alright ('Let's take the logo we did for the mobile services company, who was it, yeah Videocon, rotate it by 90 degrees, invert it, and, just in case someone calls us on it, we'll change the colour'). Probably the easiest crore or so they've ever made.

The 2G scam is devolving into a tit for tat, with the BJP government in Karnataka being fingered in retaliation. I don't know if anybody still believes that these scams are 'discovered' just when they can be leveraged to the full. Odds are near certain that there are people from the opposite camp watching all the irregularities and filing them away for future use.

It also proves the adage that it is better to ask for forgiveness than for permission, since moves are now afoot to 'regularize' the deals -- through tap-on-the wrist penalties, no doubt -- by which the violating companies got their licenses.

Staying on the subject of mobile services, yeah, mobile number portability is just around the corner, I promise.

Update: This from Reddit.

Wednesday, November 10, 2010

Speigel interview

I don't know if the questions were really this hard hitting or if the translation is to blame (italics mine):
Schäuble: I'm not that pessimistic in this regard. Although the Irish have accumulated huge debts to bail out their banks, they are making good progress in cleaning up their economy. And I also have great respect for the Greek government's resolve. A few months ago, hardly anyone would have believed that the Greeks would manage to implement such a drastic austerity program. They're moving in the right direction now.

SPIEGEL: Conditions in Europe are not as orderly as you describe. Just two weeks ago, the European Council (the EU body in Brussels that includes the heads of state and government of the membber states) decided to introduce a new crisis mechanism for over-indebted euro nations. Are you satisfied with the result?
and
Schäuble: The Council's decisions are a great success. Only a few weeks ago, many predicted that France would never support Germany in its commitment to a European crisis mechanism. And that the French would be willing to change the European treaties to do so was seen as completely out of the question. But then Chancellor (Angela) Merkel and President (Nicolas) Sarkozy met in Deauville and achieved a historic breakthrough on both issues. It's completely in line with the approach we Germans have always supported.

SPIEGEL: You can't possibly believe what you're saying. Until recently, Germany was demanding automatic penalties for countries that violated the debt rules of the euro zone. That demand is now off the table.
Ballsy, alright. Can't imagine our fawning media (or, for that matter, the American press) doing this.

Wednesday, October 20, 2010

Predicting the English Premier League - Part 1

My current project is to come up with a predictor for the English Premier League. Football + coding in Lisp + modeling/statistics -- throw in a fat man and it's Christmas. Not to mention, if the predictor is any good, a chance to make some money as well.

The bulk of the coding is complete -- the data loading, extracting the various bits from the match statistics, and so on. It's the prediction part that's tricky, as it should be.

The idea is to identify the predictors first. This is the first cut:
  1. The home record for the home team

  2. The away record for the away team

  3. The overall records for both teams (points scored out of the maximum possible so far)

  4. The recent records for both teams (recent == last three matches)

  5. Goal difference for the teams
These variables are not strictly fully independent (goal difference and overall record, for example), but I'm going to go with them for now. The prediction takes into account only the current season's matches, though ideally it would be better if it included all the match stats available -- this would help facts like 'Team A has never beaten team B in since 1973', for example, to come through and influence the prediction.

In machine learning terms, the problem is a multiclass classification problem, with the classes being 'home team win', 'away team win' and 'draw'; I am not looking at predicting scores, only results -- I assume one can bet on (and make money with) just results.

I turned to the venerable Elements of Statistical Learning to beef up on the theory, but soon beat a hasty retreat -- if you're just looking for overviews of the different techniques/algorithms and how to implement them, this book is not for you. I next turned to Wikipedia and found it somewhat better, though the sections on statistics and machine learning are still too heavy for my liking.

Anyway, I started with a) a linear regression model, with the three classes represented as equal intervals in [0,1] (I hope this is kosher) and b) the k nearest neighbours algorithm. I wanted to implement both of these methods myself, but the linear regression seemed too much of a diversion, and I settled on using R's glm() function for this instead. KNN proved pretty easy to implement, on the other hand.

The season is only eight match-days old, so there's not a lot of training data. Both the methods' predictions are pretty abysmal (accuracy of around 30-40%), and my own predictor which just looks at the total record and recent form matches these methods' performance (not to mention the method based on random number generation that behaves like the fricken Rain Man).

The next step is to try out other methods and read up on model selection.

Speaking of using Lisp, I have sort of come to a decision with respect to programming languages: it's going to be Lisp from now on (more particularly, Common Lisp). Yeah, I know about Stroustrup's quote about being fanatic about a single language, and the warm, fuzzy feeling I get when I think about Smalltalk, but Lisp is, to paraphrase Robert Pirsig, the high country of the programming world, what with its purity and elegance, "code is data", and the way you're able to accomplish so much with so little, with code that simply flows. I had considered this question earlier, and had settled in favour of Smalltalk, but I guess you gotta do what you gotta do. Anyway, Smalltalk and Haskell are still going to be in the toolbox. Another thing in favour of Lisp is that I made the effort to get to know the Allegro CL IDE better, and have taken a liking to it -- while the shortcomings I have mentioned earlier are still there, my productivity has definitely improved because of the increased familiarity with the shortcuts and IDE features. Oh, and the fact that I took the time to fully grok the chapter on CLOS in On Lisp and had my mind blown helped, too.

Update: Part 2 is here

Saturday, September 11, 2010

RIP Bloglines

Bloglines is shutting down. It was (the future tense is a bit premature, since the service will be up till October 1) easily the best online newsreader, Google Reader notwithstanding. I have also tried out alternatives like Newsgator and Feedshow in the past, but I didn't feel as comfortable with them as with Bloglines.

One of the reasons for Ask.com shutting down the service: the supposed waning popularity of RSS as compared to Twitter and Facebook as more effective means of real-time information flow. Doesn't sound very convincing to me. Twitter and Facebook have a place -- e.g., when I want to know how Amitabh Bachchan's digestive system reacted to the new breakfast he tried yesterday (not to mention herding away from Blogger and Wordpress all the non-serious twats with short attention spans and few original things to say), but this in no way reduces the importance of RSS; reports of its death are vastly exaggerated.

Sunday, August 29, 2010

Sweden

Got back from a three-day trip to Sweden last night. It was actually a one day trip, if you consider that I was in transit for two of the three days.



Sweden is a lovely country with friendly people. The climate was good too, with summer drawing to a close. But one thing that struck me was the number of smokers I came across -- I don't know where the country ranks in terms of number of smokers per capita, and so on, but people don't seem to be bother about emphysema, cancer, and the like. No regulations on public smoking also meant that I was exposed to quite a lot of second hand smoke during my waits at the railway station. One more thing: people are permitted to take their dogs inside trains too. Good for them.



I spent the one day I was there at Lund, a charming university town more than a thousand years old. The only negative aspect (two, if you count the taxi driver whom I think charged me double the actual fare) was my missing the train to Stockholm because of mistaking the inbound train for the outbound one (in my defence, both trains arrived at the same time, and no train numbers are displayed on the departure and arrival boards), and having to rush to Copenhagen and take an alternate flight, with all the attendant worries about changing your ticket, catching your connecting flight on time, and so on.

Monday, July 19, 2010

Lisp interpreter

From an old interview with Richard Stallman, via comp.lang.lisp:
LinuxCare: Wasn't the LISP interpreter written using lex and yacc?

Stallman: No, absolutely not. There's no reason to use lex and yacc to write a LISP interpreter. The syntax is so simple you don't need it. You'd just be making things harder.

Oops, I never got the memo - a while back I wrote a Lisp interpreter using the venerable old tools. Now is as good a time as any to release the interpreter in the wild -- here it is.

Saturday, July 03, 2010

Fare jumpers insurance

Via Xymphora:
[T]urnstile hoppers in Paris have formed an insurance fund so that whenever one of them is caught by the police, their fine/expenses are fully covered.
You guys are just a decade or so late; maybe you can take some pro tips from the experts in Ulhasnagar.

Sunday, June 27, 2010

Italy's exit

Italy's exit from the World Cup has been blamed on ageing defenders, unimaginative play, and so on, but I think there's a more direct reason: Buffon's injury. All the three goals conceded by Italy against Slovakia can be attributed to errors by Marchetti, Buffon's replacement -- inability to adapt to an unforeseen loss of possession at the edge of the box (goal #1), not fully covering the near post (#2), and being a step too late to smother the attack (#3). The reason for the attack being lacklustre was Pirlo's absence; witness the improvement in the accuracy of passing and the incisiveness once he came on.

My already low opinion of footballers has sunk even lower, watching their histrionics. Unless something is done to curb their cynical behaviour (allowing post-match usage of video footage to dish out liberal punishment would be a start), using 'football' and 'beautiful game' in the same sentence would make sense only if there is a 'not' somewhere in between.

Some vuvuzela humour (courtesy Reddit):
  1. A web site that adds the vuvuzela blare to your browsing experience
  2. Vuvuzela instruction manual
  3. A vuvuzela hits CD
  4. Heaven and hell
By the way, the broadcasters seem to have done something to reduce the noise -- things are much quieter in the round of 16.

All time favourite musical moment in a movie

Someone asked the question "What is your all time favourite music moment is a movie?" at Reddit. The first thing that comes to mind is the climax of The Last of the Mohicans, and it's not just me:
I like the part of Last of the Mohicans when they are running up the mountain path to exact revenge. Awesome instrumental accompanied by chopping people up with large blades. Gives me the chills every time.
Amen to that -- goosebumps time, alright.

Sunday, June 13, 2010

World Cup

  1. Yes, please do ban the fricking vuvuzelas. I had to twiddle with the sound system in my TV for half an hour to figure out a way to create a custom audio profile that reduces the impact of their blaring.

  2. I've realized something which has been gnawing at me for quite a while: 90% of football -- 90% of all matches, as well as 90% of any match -- basically sucks. Unless it's your team playing, watching the ball being swatted about as if it's a pinball machine, with nary a goal-mouth action for practically the whole match brings no joy. Stuff like this and this make more and more sense.

  3. Some advice to footballers: if you're already on a yellow card, depending on the referee's interpretation of the rules to avoid a second yellow and get off with just a foul is plain dumb, so spare us the indignant looks and hangdog expressions when you're given marching orders. Oh, and stop being such pansies.

  4. Maybe it's just me, but the African teams' corner flag celebrations after scoring goals are starting to look cliched and lame. Roger Milla you guys aren't.

Friday, May 14, 2010

Is it just me

... or is the new Parle LMN ad featuring the two bushmen searching for water incredibly racist?

Sunday, May 09, 2010

What's with the telecom scam?

Headlines Today have been going hammer and tongs with their expose for the last two or three days, while there's not a peep from the likes of The Hindu, Deccan Chronicle, and The Times of India. Isn't a tapped telephone conversation involving a minister -- in the central government, no less -- in which he discusses portfolio allocation with a corporate lobbyist ("My case is cleared?") worthy of at least a couple of centimeters of column space?

This government has to be the sleaziest one ever, by a long mile. What with doubts being raised about our voting machines, I wouldn't be surprised if it turns out that they came to power by rigging the EVMs. Having somebody like Manmohan Singh at the helm only makes it worse.

Saturday, May 08, 2010

Are we alone?

Stephen Hawking has recently weighed in on the question of whether we are alone in the universe. His logic is that there are a hundred billion galaxies, each containing hundreds of millions of stars, so it's unlikely that Earth is the only planet where life originated. Sounds plausible, but here's a counter-argument: suppose a phenomenon occurs once in 10^100 times. We know that there are 10^20 samples, which is a large enough number, and erroneously conclude that it is large enough for the phenomenon to occur more than once. The moot point here is the actual probability of the event, i.e., the 10^100 figure -- there's no reliable and/or scientific way to validate this.

Thursday, May 06, 2010

Just throw the bums out

When the President of the United States cannot stay in office for more than two terms, there's no justification for these people to cling to their chairs.

Indian EVMs vulnerable to fraud

Well, all the folks patting themselves on their backs have some explaining to do. From a University of Michigan study:
Electronic voting machines in India, the world's largest democracy, are vulnerable to fraud, according to a collaborative study involving a University of Michigan computer scientist.

Even brief access to the paperless machines could allow criminals to alter election results, the seven-month investigation reveals.