Tuesday, December 11, 2012

December 11, 2012

fool  

/fo͞ol/
Noun
A person who acts unwisely or imprudently; a silly person: "what a fool I was to do this".

id·i·ot  

/ˈidēət/
Noun
  1. A stupid person.
  2. A mentally handicapped person.
Effing idiots. Or are they fools? Now I'm confused.
Context: this and this.

Tuesday, December 04, 2012

December 4, 2012

Awfully decent of the Chinese, preferring to pay for stuff rather than pillaging and plundering the to-be-annexed Indian territory:
In 1962, for example, Deak warned the CIA that China was planning to invade India after his company’s Hong Kong branch was swamped with Chinese orders for Indian rupees intended for advance soldiers.

Wednesday, November 28, 2012

November 28, 2012

Sachin Tendulkar:
When I feel it is time, I will take a call. It is going to be a tough call nevertheless. It is going to be tough because this is what I have been doing all my life. It is going to be difficult to suddenly hang up my boots one day.
I have the highest regard for Tendulkar, but somebody please give the man a copy of Who Moved My Cheese?

Reason #1876 why I'm glad I didn't take the civil services exam -- questions like this:
Domestic resource mobilisation, though central to the process of Indian economic growth, is characterized by several constraints. Explain in ten words.
I made up the "ten words" bit, but I think I would have shown myself the door because my ten words would have been roughly divided as below:
  • Babus
  • Netas
  • Corruption
  • Nexus
  • Six words unprintable in a family blog

Monday, November 26, 2012

November 26, 2012

One little-noticed wrinkle in the recent failed no-confidence motion is that it serves as 'inoculation': no other such motions can be brought up against the government for the next six months. Watch out for attempts to push through more audacious policies/legislation, without any worries about the government falling because of such attempts.

Friday, November 23, 2012

November 23, 2012

Even when victorious, let there be no joy,
    For such joy leads to contentment with slaughter.
Those who are content with slaughter
    Cannot find fulfillment in the world.
-- Tao Te Ching

Something entirely lost on these joyous folks. Contrast this with the reaction of Major Unnikrishnan's father.

I think I've said this before, but will say it again: the best way to decide whether somebody gets the death penalty is the Arab/Shariah custom of putting the question to the victim's family. Needless to say, this is not a pardon, but only to decide whether the murderer is put to death or spends the rest of his life (life; not 14 years commuted to 10 on account of Gandhi Jayanti, good conduct, and so on) in prison.

Wednesday, November 21, 2012

November 21, 2012

Yeah, that about sums it up:
Let's clear this up again. The ECB is going to buy bonds of bankrupt banks just so that the banks can buy more bonds from bankrupt governments. Meanwhile, just to prop this up the ESM will borrow money from bankrupt governments to buy the very bonds of those bankrupt governments.
Another interesting tidbit from the report: the demographics are so bad in Japan that they actually have adult diaper fashion shows.

Wednesday, November 14, 2012

Quote of the day

[H]aving the career of the beloved CIA Director and the commanding general in Afghanistan instantly destroyed due to highly invasive and unwarranted electronic surveillance is almost enough to make one believe not only that there is a god, but that he is an ardent civil libertarian.
-- Glenn Greenwald

Tuesday, November 06, 2012

Predicting the English Premier League - Part 3

Having just completed the machine learning course in Coursera, time to put the knowledge to good use. Neural networks seem to be the most promising among the classification algorithms (logistic regression and SVMs being the others covered in the course) -- I did do bit of mucking around with logistic regression, but the results were singularly disappointing.

Since we're dealing with neural networks, no need to be picky with what features to use; in addition to the ten parameters considered the last time, let's throw in as many additional ones that we can think of, and let the algorithm sort it out. Here are the features forming the input layer (the features are normalized -- something I didn't do the last time):
  1. Home record of home team
  2. Away record of away team
  3. Record of home team
  4. Record of away team
  5. Record of home team in last three games
  6. Record of away team in last three games
  7. Record of home team in last five games
  8. Record of away team in last five games
  9. Record of home team in last seven games
  10. Record of away team in last seven games
  11. Record of home team in last three home games
  12. Record of away team in last three away games
  13. Record of home team in last five home games
  14. Record of away team in last five away games
  15. Record of home team in last seven home games
  16. Record of away team in last seven away games
  17. Total goals scored by home team
  18. Total goals scored against home team
  19. Total goals scored by away team
  20. Total goals scored against away team
  21. Position of home team in points table
  22. Position of away team in points table
We use one hidden layer with five activation units -- could've used more hidden layers, but the code I wrote for the course assignments is for a single hidden layer, and I'm too lazy to bother to make the code more general. Not to mention that the efficacy of using more layers is moot.

The examples are a total of 560 matches from the 2010-11 and 2011-12 seasons (we ignore the first few weeks of each season to a) get things to settle down and b) avoid division-by-zero errors for some of the features (e.g. when we're considering the first match a team plays in the season).

350 matches are used as the training set and 30%, i.e. 105, from the remainder form the cross validation set.

After a lot of number crunching, the results are not too good, at least not yet. It looks like I'll be needing more data (as indicated by the results from the learning curve plots). A lambda value of 0.16 or 0.32 seems to be the most promising.


The next step is to get the results for the 2009-10 season -- and earlier if required. More grunt work. Stay tuned.

Update: Well, I went all out and got the results for three seasons -- 2007-08, 2008-09 and 2009-10 -- but no cigar; the prediction accuracy refuses to go above ~50%, whatever values of lambda and feature list I consider (I added two more features to the above list: total games played so far by both teams). It might be possible to squeeze out a bit more by running a genetic algorithm and figuring out the best lambda value and features, but I don't think the effort is worth it. Question: what is the minimal prediction accuracy required to get a 20% return on bets over the long-term, e.g., over an entire season?

Friday, November 02, 2012

Question of the day

"After hundreds of drone strikes, how could the United States possibly still be working its way through a 'top 20' list?"
-- Gen. Ashfaq Parvez Kayani to Adm. Mike Mullen

Sunday, October 28, 2012

October 28, 2012

Imagine a slightly larger-than-life statue of a naked boy-man wearing only the remnants of a pair of jeans and a hat that looks like a flak helmet, his foot resting on the severed, blood-dripping head of a Roman legionary.

Oh wait, you don't have imagine it. Here's an actual picture:


Picture courtesy of the Rock Garden, Malampuzha, Kerala. I'm too lazy to google for it, but I bet there is a back story involving a twisted and diseased mind that spawned the whole house of horrors (the above picture is only a sample; there's a lot more cringe-inducing crap in my vacation pictures folder). 

Saturday, September 29, 2012

September 29, 2012

Comment of the decade (on Business Insider's 1068th Marissa Mayer story):

Is Farrukh Dhondy aware of Nafeez Ahmed's post about Abu Hamza's links with MI6? The sad part is that the visibility such an op-ed column gets is orders of magnitude greater than what Nafeez Ahmed's writing does.

Thursday, September 20, 2012

September 20, 2012

The Hindu on allowing FDI in retail:
Even within the retail trade, the government’s claim that FDI is good for the nation is difficult to defend. The success of large retail cannot be based only on the expansion of the retail space, but requires acquiring a share of the existing space occupied by small retailers. NSSO data for 2009-10 indicate that the occupational category consisting largely of the wholesale and retail trade employed 44 million Indians. The displacement of a substantial number of these workers is inevitable. Since the economies of scale and scope that size delivers in organised retailing are expected to reduce costs by raising labour productivity, the expansion of large retail will not compensate for this employment loss.
Which reminds me of this comment by 'StarmanSkye' at RI:
 I guess the New Politics of neo-Conservative values which we see in the unprecedented official government protection that encourages the power & privilege of the financial criminal class suggests a kind of logical argument can be made that the trend from "Its the duty of every American industry, company, corporation, business person and citizen to maximize their profits by any *legal* means allowed, including evading, deflecting, eliminating or deferring their tax liability" leads to:
"Its the duty of every worker to inhibit productivity by any and all means *legally* allowed so as to stimulate maximal employment of the work force".
Game, set and match.

Thursday, September 13, 2012

September 13, 2012

Rotten meat? More like local traders being undercut by low-cost 'imports' from neighbouring states protecting their turf by siccing the authorities on the pretext of hygiene.

Reminds me of restaurant owners suddenly developing concern for their patrons and trying to protect them from the unhygienic food in roadside eateries some time back.

Thursday, September 06, 2012

September 6, 2012

Well, Mish finally addressed the real estate scenario in India and, as I expected, didn't have nice things to say about it.

There are times when you hear so many good things about something -- be it a book, a movie, or a song -- and when you finally get around to reading/watching/listening-to it, the experience is quite underwhelming because of the raised and unrealistic expectations. Cryptonomicon falls into this category for me. While portions of it were good reading (especially the crypto anarchy bits), overall the book simply rambles on and on for 900+ pages. The fact that I enjoyed Bruce Schneier's appendix on the Solitaire crypto system more than at least 50% of the book says a lot.

Monday, August 13, 2012

August 13, 2012

The Hindu on the trial of Gu Kailai:
However, a detailed account of the prosecutor’s case that emerged late last week has provided rare insights into the dealings of one of China’s most popular politicians, who was a key figure in the 25-member Politburo before his suspension in April. Part of the account was released by the official Xinhua news agency, while other details came from an Anhui student who sat in on the court’s proceedings. His account was independently verified by a lawyer who was present in the courtroom.
Read that again carefully. They're not talking about the lack of transparency regarding the government in China -- contracts, policies, and so on; they're talking about the lengths one has to go to to even know how the trial is being conducted. It's not like state secrets would be laid bare if the proceedings were not held in camera (so to speak); this is just a plain old murder case. But again, this is China we're talking about. There is a good chance that a body double would serve Ms Gu's sentence out.

On a related note, we're once again reminded of the questionable non-merit-based admission policies of Ivy League universities.

Friday, August 10, 2012

August 10,2012

Nicholas Kristof (emphasis mine):
US President Barack Obama's finest moments in foreign policy, like the Osama bin Laden raid or the Libya intervention
Stopped reading right there. Mr Kristof, welcome to the kill file. We have some delightful companions for you there.

Thursday, August 09, 2012

Monday, July 30, 2012

July 30, 2012

The Hindu's policy regarding online comments:
  1. Comments will be moderated
  2. Comments that are abusive, personal, incendiary or irrelevant cannot be published.
  3. Please write complete sentences. Do not type comments in all capital letters, or in all lower case letters, or using abbreviated text. (example: u cannot substitute for you, d is not 'the', n is not 'and').
  4. We may remove hyperlinks within comments.
  5. Please use a genuine email ID and provide your name, to avoid rejection.
I can see where they're coming from with respect to #3 -- they don't want their pages to be polluted by the Neanderthals hanging out at rediff.com -- and find their grammar nazi behaviour naive and endearing, but I still think their backsides need a strong and liberal application of the cluestick.

Tuesday, July 10, 2012

July 10, 2012

Quote of the day: "Next, we'll probably hear that Lloyd Blankfein over at Goldman Sachs has been tinkering with the rotation of the earth in order to gain a few micro-milliseconds of advantage in his firm's high frequency trading rackets."
-- James Howard Kunstler

There has been a lot of commentary about the confusion regarding the name of the Indian prisoner released from Pakistan. In particular, somebody mentioned that the returning (pardoned) prisoner should keep his trap shut and not blab about being a spy for India, as this makes the task of negotiating the release of other such people all the more difficult. Can't really fault this logic, but I have more fundamental issues: why are we sending folks into enemy territory to engage in such acts (not to mention bombings, if the allegations against Sarabjit Singh have any merit)? This may be a naive view of how foreign policy is conducted, but ahem, we are different, aren't we? Ours is the land of Gandhi and the Buddha -- we would never do these things, things that only other countries do, would we? In my rule book, if a fair and impartial trial (best conducted by a disinterested third country like, say, Iceland (I wanted to say Norway, but some folks may remonstrate against this since Norway is -- was? -- involved in mediation efforts in Sri Lanka and may not fully qualify as a disinterested party)) shows that Sarabjit did commit these things he's accused of, he should hang. Period. No 'My country, right or wrong', 'But he was only doing his patriotic bit for the country' business. Patriotism is taking a gun and defending your border against an enemy, not terrorism or other nefarious activities that would get you peremptorily -- and legally, I think -- executed in wartime. One positive fallout of such an action would be that we can mete out the deserved justice to Kasab as well, instead of waiting on him hand and foot in prison. This will also open the eyes of gullible folks who get railroaded into doing James Bond duty for the country.

Friday, June 15, 2012

Quote of the day

"... at times, it was like watching a practice game involving ten green traffic cones as Spain cut Ireland apart.
-- On Ireland's exit from Euro 2012

Ouch.

Wednesday, June 13, 2012

The JEE Controversy

Some thoughts on the JEE controversy (disclosure: I received my bachelor's degree from IIT Madras):
  1. There is merit to the argument that IITs have not fulfilled their mission of making India a science and technology powerhouse. There is a big disconnect between the quality of the undergraduate students (leaving aside the dilution of the standards in recent years) and the quality of the engineering and R&D output produced. Also, a very small fraction of the undergrads take up careers related to their majors (I too am guilty of this). However, this argument is orthogonal to the problem of determining the best way to admit students to engineering colleges in India.

  2. Having each IIT conduct its own entrance examination is not the answer. Subjecting a high school student to, say, 15 entrance examinations borders on child abuse.

  3. The UPA government seems hell-bent on wreaking havoc with the IITs. First it was the increase in the number of IITs, now this. There is a strong lobby of bureaucrats and other elites who want their wards to go to prestigious institutions like the IITs, but are stymied by pesky things like the JEE. The more enterprising of them wangle admissions from top American universities using their connections -- don't even get me started on the backdoor alumni recommendation route that gets somebody like Bush Junior into Yale; god forbid the day such a thing becomes reality in India. The reservation for other backward classes is also an attempt by the elites in this direction. If you can't beat 'em, dilute 'em.

  4. One of the charter goals of the alumni associations should be to protect the IIT brand. I have not been recently involved in the goings-on of the IITM alumni association, so I don't know if this is being taken up. If things continue to progress at this rate, there may come a time when degrees from the IITs are accorded the same respect as those from some of the more infamous colleges in Chennai (one would be surprised to know of the esteem those degrees were held in two or three generations ago).

Friday, June 01, 2012

June 1, 2012

Well, it took three years for my prediction to come true. "We cannot wait forever" -- indeed, how magnanimous of you.

Tuesday, May 29, 2012

May 29, 2012

IPL 5 is over. While the matches provided a lot of excitement, I would be more convinced about the genuineness of the whole thing if someone did an analysis of the numbers and proved that there were no match/spot fixing shenanigans. One thing that comes to mind is no balls: some statistical significance studies on the number of no balls bowled versus the bowlers and at what stage in the match they were bowled, was it a touch-and-go decision or was it blatant overstepping, and so on.

Having recently witnessed the scenes of celebration at the Etihad Stadium, the contrast with the IPL final could not have been starker. The inordinate focus on the owner -- who might as well have worn a clown costume, by the way -- instead of the players who made it happen, the lack of genuine grassroots support (Usha "Look at me, I have a whistle in my mouth" Uthup, Juhi Chawla and other assorted celebrities trying to warm themselves in the spotlights do not count), the contrived joy and enthusiasm of the players who did not figure in the playing eleven -- there is a difference between waiting 44 years for a trophy as compared to five.

Monday, May 14, 2012

May 14, 2012

"Some people believe football is a matter of life and death, I am very disappointed with that attitude. I can assure you it is much, much more important than that"
-- Bill Shankly

You don't care about the quality of the passing, the skills on display, or the individual brilliance. The only thing that matters is that the ball crosses the line between the goalposts, and twice at that. The tears that slowly begin to roll when it looks like it's all over, the look of despair that turns into joy (and vice versa for the United fans -- a bonus if you're a staunch anybody-but-United guy like me), Aguero's shirtless run towards the corner flag, Joey Hart terminating the interview on account of becoming overwhelmed by the situation, the commentator's schadenfreude ("How will the fans face somebody in a red shirt this evening? How will they have the moral fiber to get up tomorrow morning and go to work...?" Fuck you.) turning into astonishment.

The Beautiful Game? No, but this is football.

On a personal note, I'm not even a City fan, but the euphoria I felt when they scored the winner was comparable to what I felt when Del Piero scored in the 2006 World Cup semi-final.

Oh, and by the way, I stubbed my toe quite hard when I jumped up from the couch to celebrate. Still hurts, but totally worth it.

Thursday, May 10, 2012

May 10, 2012

The Times of India might as well rechristen themselves as The Pimps of India.

There is a reason they sell the paper for less than 25 bucks a month: it isn't their readers they make their money from.

Wednesday, May 09, 2012

May 9, 2012

Yesteryear's heartthrob
Is it trademark shake of head?
Is it Parkinson's?


The Havells ad featuring Rajesh Khanna has to be the most depressing thing I've seen on TV for some time.

Monday, April 30, 2012

April 30, 2012

This is probably a hoax, but intriguing all the same.

Staying on the subject of pop culture and hip hop, have you ever watched a movie that was so bad that it went around the world and became good when it came back? Something along the lines of music that gets voted the worst and climbs the chart because of this? Well, I watched such a move yesterday (Torque, in case anyone's interested). Bad (or non-existent, since we're talking about Ice-Cube here) acting, cliched dialogue (case in point: "Don't pick on girls", says the resident bimbo after boinking a bad guy -- my brain cells are still tingling at this repartee), you name it, this movie had it. My only regret is that I couldn't watch it till the end. Just kidding. Maybe not.

Thursday, March 15, 2012

March 15, 2012

I have said this before, but my comment bears repetition in light of today's cartoons. Why do the folks at The Hindu give pride of place (i.e., the op-ed page) to insipid crap like this:


when they have a much better talent on their payrolls, producing stuff like this, stuff which has to languish in the inner pages:

Tuesday, February 21, 2012

Quote of the day

"I am getting out in funny way, like flicking to point"
-- Virender Sehwag on his recent form

Don't know whether to laugh or to cry.

Thursday, February 02, 2012

The Goonda Regiment

The men in uniform are at it again, demonstrating that pesky little things like respect for the rule of law don't apply to them. A couple of questions for them: didn't you swear to protect the country -- which, last time I checked, includes its citizens -- when you signed up in the army? Does beating up innocent civilians who had nothing to do with your tiff with the police jibe with the oath you took? The excuse that the police behaved in an abusive manner does not cut it: two wrongs do not make a right. The particularly galling thing is that the violence was perpetrated not by jawans, but by fricking captains, who are supposed to set an example for the men they command (Update: it looks it was jawans). But then again, I guess this is in keeping with the state of things when you have a Chief of Staff hell-bent on clinging on to his position at any cost.

Tuesday, January 31, 2012

Where are we going?

(Warning: I don't know where I'm going with this post; I guess it ends when it ends)

I used to read Clusterfuck Nation and Club Orlov on and off in the past, whenever somebody in one of my regular haunts made a mention of one of their more noteworthy posts. I subscribed to their RSS feeds a while back (RSS is just like Twitter, except there is no 140 character restriction, and the content is slightly more meaningful than updates about celebrities' breakfasts *snark mode off*). A regular dose of doom and gloom stuff (maybe I should include Mish Shedlock's blog here as well), while fulfilling its disaster porn role, doesn't result in any constructive or positive outcome; for someone in India, being exposed everyday to the 'things have never been better, buy your dream car, your dream house, take your dream vacation, and while you're doing all this, tweet about it to your 1579 Facebook friends in real time using your ultra slim shiny smartphone' hard sell, this seems a world away, but is it really so? What would happen to us if the eurozone crisis finally comes to a head and countries start defaulting? If the price of oil goes through the roof because the USS Enterprise is torpedoed in the Straits of Hormuz? If there is a global ban on travel because of the next outbreak of bird/swine/monkey/rhino flu that came about because some scientist in a lab somewhere was wondering 'Gee, what would happen if I take this test tube of monkey piss and slightly shake it above the head of this disgruntled pigeon who has been looking askance at me since yesterday morning?'? What if the Indian real estate bubble finally bursts? What if the Sensex tanks? What if our exports took a nosedive, taking along with them the aspirations of the newly rich middle class? What if we run out of drinking water? Electricity?

The answer to these questions is pretty simple, really: a lot of people will be screwed, some more so than others. But how many of these scenarios will actually play out within the next year or so (ignoring the bits about electricity and water; I think we're safe on both fronts for another decade)?

One can go about analyzing these issues in a rational manner and doing our research, but this is not really needed; we can figure things out if we keep in mind certain things:

1. If bad things are coming down the pike, they will invariably be dumped on the people at the bottom of the food chain, those who cannot complain too much.

2. People in positions of power and wealth will game the system and get away with it every time.

3. No one can be proven right or wrong when it comes to principles of economics and ideology. The world is too complicated, there are too many variables, you cannot do double blind experiments with control groups, etc. In practical terms, this means that no philosophy or approach can ever be definitively disproved and jettisoned; any pundit worth his salt can rationalize away the failures and non-conformances to the 'model'.

4. People keep expecting the next messiah to solve all their problems. Not going to happen.

5. The kind of hyperinflation or currency crash similar to the experiences of the Zimbabweans or the Wiemar Republic will not happen with either the dollar or the euro.

6. When people in power are in trouble, watch out for distractions, both catastrophic (Iran vs USrael) and merely irritating (retail FDI controversy, Salman Rushdie). Also be prepared for dirty tricks. These people have too much vested in the status quo to go without a fight. They're are also very smart (which is a given considering where they are and how long they have remained there). Cf. Women's reservation bill, Lokpal bill.

7. Everybody has their price.

Applying these, for want of a better term, principles, to all the questions raised above is left as an exercise for the reader.

Friday, December 02, 2011

The Retail FDI Controversy

With all the noise and disruption of parliament over the allowing of FDI in the retail sector, who's now talking about the Lokpal bill? Mission accomplished.

Tuesday, November 22, 2011

pLisp v0.1 released

pLisp (The 'p' stands for 'personal', at least as of now) is an interpreter for a Lisp-1 dialect I have been working on. I had four broad objectives when I started out:
  1. Use the experience to learn Lisp at a much deeper level than what a casual user would attain
  2. Build my own language/development environment, one that I would use for all my personal projects from now on
  3. If I manage to take the project sufficiently forward, build a Lisp development environment for newbies that rivals those of Smalltalk
  4. Use pLisp as a test bed for new research ideas related to programming
I think things are sufficiently mature enough to warrant a 0.1 release, although a not-infrequent assertion failure or segfault cannot be ruled out.

These are the features currently supported:
  1. Basic operators like CAR, CDR, and other language primitives (cf. Paul Graham's 'Roots of Lisp')
  2. Other operators and utility functions written in pLisp itself (there is a rudimentary library at present)
  3. Error handling in the form of an '(error "...")' operator
  4. Garbage collection
  5. A somewhat buggy foreign function interface
  6. Ability to store and load images (aka serialization)
  7. Macros
  8. A rudimentary debugger (step, break, resume, abort)
  9. A package system
TODO list:
  1. More comprehensive error handling; there are a lot of places where sanity checking of parameters is absent, leading to assertion failures or core dumps
  2. Enhancements to the core library
  3. Graphical development environment
  4. Compiler
  5. Continuations and implementations of other 'cool' research ideas
pLisp uses tpl for serialization and libffi for the foreign function interface.

Sunday, October 09, 2011

October 9, 2011

Some random thoughts on the ongoing Rugby World Cup:

1. I've really made an effort to understand the nuances of the game and enjoy it, but it's not easy. The most important thing to keep in mind is that there is only a single line of defence to stop the attacking team from piercing through and running all the way to score a try. This, coupled with the 'no forward passing' and offside rules, pretty much dictates the dynamics of the play. But there is still an element of ugliness to the game, most notably exemplified by the pile of bodies that takes place during a ruck. We have no idea what's happening inside, where the ball is, and so on (wonder how the referee keeps on top of things, short of jumping into the orgy himself). Things are not clean and simple, so to speak (compare this to football: 'you can only kick the ball with your foot; now try and put the ball between the two posts'). The skill displayed by a player is not readily apparent to someone who is not a fan of the sport.

2. Speaking about the refs, it's refreshing to hear the referee (and the adjudicating referee) on the microphone most of the time. More transparency this way.

3. The small number of fouls is quite amazing when compared to, say, football (not talking about technical violations here). My theory is that the 'almost anything goes' nature of the game does away with the need to commit physical fouls. Who needs to break the law when you can legally do a number on your opponent? Rugby players can both dish out and take stuff, unlike footballers who writhe on the ground in feigned agony if an opponent so much as looks at them funnily.

4. Notwithstanding the fact that it takes more strength and stamina to go through 40 minutes of non-stop action than to get through a comparable period in American football, American football is eminently more watchable. The skipping of the heartbeat every time the quarterback is about to pass the ball is missing. There are exhilarating moments in rugby too, like for example when a player dodges the defence and is streaking towards the tryline, but these are few and far between. The strategizing, playbooks, etc. of American football is missing (or maybe I can't figure things out on account of my noobiness).

5. The pre-match war dance (saw the New Zealand team do it today) is extremely silly. Sure, some opponents may get freaked out by a bunch of brutes grunting in tongues, crowing about how they will shove their brawny and tattooed arms up their opponent's asses and punch their intestines black and blue, but any half-intelligent person is more likely to struggle to not double up on the ground with laughter.

Saturday, September 24, 2011

Obama's actually right

Peace will not come through statements and resolutions at the UN. Only wars of aggression, crimes against humanity, and the murder of innocent men, women and children do.

While asking for full membership at the UN is a positive thing, as long as things are decided by the five veto-wielding so-called superpowers, the UN is as good as non-existent. In fact, at least the child-trafficking and other abuse would stop if it were disbanded.

Monday, September 19, 2011

September 19, 2011

One of my pet phobias is large objects. It's not exactly a phobia per se, but more of a slight shiver that runs down (or up?) your spine for a fleeting moment and you quickly think of shining happy thoughts to distract yourself. I think this had its genesis in the movie The Independence Day in which, if I remember correctly, a spaceship a few miles in diameter fills the sky above Washington, DC.

Now just imagine that it's not a spaceship, but the planet Jupiter, and that it's not a few miles in diameter, but is 71,492 fricking miles from one end to the other, and is so big that your entire sky is but a closeup of the planet's terrain.

You don't have to imagine this, actually. You can see a simulation video.

Sweet dreams, here I come.

Saturday, September 17, 2011

Speculators Behind 2008 Oil Shock

Via Rigorous Intuition:
Leaked Documents Reveal Major Speculators Behind 2008 Oil Price Shock

Last month, Sen. Bernie Sanders (I-VT) leaked confidential data about oil speculation to a number of media outlets, including the Wall Street Journal. Ordinarily, the Commodity Futures Trading Commission, the regulatory body that oversees futures trading, does not provide identities of speculators to the public. However, the data leaked by Sanders provides a rare snapshot into the trading volumes by major speculators right before the oil price spike in the summer of 2008.

As experts from Stanford University, Rice University, the University of Massachusetts, and authorities have concluded, rampant oil speculation was the prime driver of the record high prices for crude oil three years ago.
Ahem.

Wednesday, August 17, 2011

August 17, 2011

Simi Garewal's "India's Most Desirable" is my least favourite program on TV, even beating the likes of the 1876th rerun of the documentary "Hum Apke Hain Kaun". Sixty minutes of mindnumbing prattle from celebrities, interspersed with coy, pretending-to-be-hard-hitting questions from Simi (she must be, what, 98? Pity she wasn't born three thousand years ago in Egypt; she would have made a killing licensing the formula for her embalming potion to the pharaohs).

Not content with just Indian celebrities, there are plans to rope in Lady Gaga as well. That ought to be fun to watch: Queen Tut vs Lady Tut Tut...

Friday, August 12, 2011

August 12, 2011

I recently finished reading The Black Swan (well, I've yet to start the extended essay that has been added to the second edition, but still). A moderately interesting read, with a few intriguing and insightful ideas, but there is no satisfaction at the end, the satisfaction that comes from reading a book that puts its key messages in a tight-knit, coherent form and packs a good punch, so to speak. The book would also have benefited from a better editing process -- the language doesn't flow that easily in quite a few places. A good thing I got this book as a gift and didn't have to spend money out of my pocket.

The author's contempt for CEOs, Frenchmen, and academics (economists in particular) also comes through too strongly and bitterly -- this is probably his F*** You Money talking. Somewhat ironical, considering that there is a quote from a trader in the book along the lines of "Be nice to people on your way up, since you'll meet them on your way down". He could also have gone a bit easy on the frequent attempts at cheap titillation through mentions of prostitutes, how many lovers did Catherine the Great have, and so on.

With respect to the meat of the book, can't really disagree with the author's contention: we do not know what we're doing half the time, unknown forces are lining up against us as we speak, it's no use trying to do long-term (maybe even short-term) predictions, and our brains are hardwired to see patterns where none exist and are prone to all kinds of cognitive biases (on a side note, this paper does a more thorough job of this). Scalability is a theme that runs through the book -- be it scalable/non-scalable professions (the relation between the amount of money one makes and the physical number of hours put in -- e.g., doctors/plumbers vs hedge fund managers) or scalable odds (Gaussian vs Mandelbrotian).

While on the subject of scalability and the medical profession, today I learned that one can get an *ahem* discount of Rs 5000 on an MRI scan bill of Rs 8000 if the doctor is kind enough to not ask for his commission from the diagnostics center.

Saturday, July 30, 2011

GitHub

I've finally gotten around to collecting all my code in a single place. This is a pretty much complete collection, except for my JSON implementation for VisualWorks. A recent scare with my home laptop (a faulty chip related to the display) is the reason for this. I have an external drive where I periodically back up stuff, but I was not able to access my files during the absence of the laptop. I could have taken them from the external drive, but didn't want the hassle of again bringing the laptop contents in sync; not to mention I didn't have much time during this period due to a family emergency.

Thursday, July 14, 2011

Predicting the English Premier League - Part 2

As promised, here are the results of the number crunching. Some of the number crunching is still ongoing as I type this -- to figure out which of the parameters give the best results (the code in the AWS instance is running for six days; hopefully it will terminate before I hit the free tier limit of 750 hours).

First, a list of the prediction methods considered:

1. Homegrown method 1: In this method, we consider three parameters: home advantage, total form and recent form (three matches). Whichever team comes out on top on the cumulative score based on these three factors is designated the winner (no draws in this method).

2. Homegrown method 2: This method uses historical (this season only) values for fractions of home wins, draws and away wins; generates a random number between 0.0 and 1.0, and chooses one option based on where the number falls in the spectrum (length of each segment in the spectrum (HW, DR, AW) determined by the historical averages).

3. Random: Generate a random number between 0.0 and 1.0. If this is <= 0.33, it's a home team win; if it's between 0.33 and 0.66, it's a draw; otherwise it's an away team win.

4. Linear (GLM): The generalized linear model with least squares regression.

5. KNN: The K Nearest Neighbours method. There are two variations to this -- one where we simply consider the three classes as home win, draw, and away win; the other where we convert the three classes to real numbers. We also vary the number of neighbours considered from one to three.

Some general notes about the exercise:

1. We use data from match-week 10 to match-week 21 (inclusive) as training data for GLM and KNN

2. Predictions are for match-week 22 onwards

3. All match-weeks do not have the same number of games for various reasons (scheduling, snow, etc.)

4. These are the predictors used:
  • Home record of home team
  • Away record of away team
  • Total record of home team
  • Total record of away team
  • Most recent (three matches) record of home team
  • Most recent (three matches) record of away team
  • Goal difference of home team
  • Goal difference of away team
  • Rank in points table of home team
  • Rank in points table of away team

Here are the results of the prediction, first in table format, followed by graphs (click to enlarge):





As I mentioned earlier, pretty 'meh' results. Maybe the brute force method to identify the best parameters will yield something better. This method basically considers all the combinations of parameters from the above ten, and computes the average accuracy of prediction -- for the same training data and the same prediction period -- for all of them, and picks the combination (there are actually two combinations, one for GLM and one for KNN) with the highest value. But I'm not holding my breath.

Update: The brute force number crunching is finally done and the results are in. KNN (n=3) with classes, with two three parameters -- the away record of the away team and the total record of the home team the most recent records of the two teams and the rank of the home team -- gives the most accurate predictions:

Wednesday, June 08, 2011

Quote of the Day

“I am the president of FIFA; you cannot question me” -- Sepp Blatter, President of the Federation of Insufferable F**tards Associations

Lisp Compiler

I am working through "An Incremental Approach to Compiler Construction". Great fun. I started reading Lisp in Small Pieces (LiSP) a while back, but this paper is a more hands-on, tutorial approach; you're able to see the fruits of your labour sooner and measure your progress better. It would have helped more if I could have gotten my hands on the extended tutorial that is supposed to accompany the paper -- it seems to have disappeared from the web. Anyway, tackling the project with only the paper for company is more challenging.

Both this paper and LiSP use Lisp dialects as the source and implementation languages. While this has a number of advantages (can't imagine using C or C++ as the implementation language *shudder*), there is a minor drawback (I say minor because the benefits far outweigh the costs; most notably a) the joy of coding in Lisp and b) the obviation of the need for a parser) -- when you're writing regular Lisp code, you are juggling with the concepts of compile-time, run-time and read-time (to be fair, I haven't felt the need to concern myself with read-times yet), whereas when you're writing a Lisp compiler in a Lisp dialect, you now have two sets of these times to contend with -- one for your compiler and the other for your generated code. Moreover, there are transformations that convert the source expressions into simplified Lisp expressions in the source dialect, which adds to the fun and merriment. You are writing Lisp code that is acted upon by Lisp code, which then takes a quoted Lisp expression and produces another quoted Lisp expression, which is then acted upon by yet another piece of Lisp code which generates the equivalent assembly... As I said, great fun.

On second thoughts, I'm not sure whether the point about two sets of times (read/compile/execute) is really valid. The complexity mentioned at the end of the previous paragraph captures the situation more accurately.

Tuesday, May 24, 2011

May 24, 2011

The two most powerful human emotions are said to be relief and love, and this was borne out with the closure of the EPL season this weekend. There is something pathetic, and at the same time endearing, about supporters going berserk because their team scores a goal that is neither the equalizer nor the winner, but is one which enables their goal difference to climb above that of their fellow languishers in the relegation zone.

Speaking of the EPL, I have persevered in the data collection process, i.e., I have the full 38 weeks' worth of match results fed into the predictor. Time for some analysis, and hopefully, insights. Stay tuned.

Thursday, May 05, 2011

May 5, 2011

Listening to Harsha Bhogle's inane and faux cheerful prattling has always been an ordeal. I finally figured out a way to handle this (other than using the mute), based on a contrived answer to the question "Why is Harsha Bhogle so happy?" The real answer is, of course, that Harsha Bhogle is so happy because he makes shitloads of money, he's a celebrity, he's got a nice rug, and so on, but that's not the road we are going to go down. What if the reason for the overdose of cheerfulness is that he's not really happy at all, but that His Bubbliness' behaviour hides a dark secret? A secret never revealed to anyone, a secret that festers in his mind every single waking second, a secret that can only be kept at bay by focussing solely on the shining happy things in life, like the way the sunlight dances off Danny Morrison's shiny pate, like the significance of the fact that the number of stumps on both sides of the pitch are wonderfully symmetrical and equal, like how quaint and innocent is the fat lady screaming her head off in the stands when the camera is on her, like how wonderful it would be to have Kiss Cams in the IPL so we can catch geriatric couples expressing their undying devotion for each other before the entire world...

Sorry, I got carried away a bit there.

Anyway, getting back to the dark secret, if you listen to Harsha Bhogle with this backstory [*] in mind, your irritation vanishes completely, to be replaced by a tender pity for the poor man, and you almost want to pull him close to your chest, a la Robin Williams and Matt Damon in Good Will Hunting and repeatedly whisper "It's not your fault" (I said 'almost' because, you know, you don't want to get too close to the rug, considering that it will be just below your nose, with Harsha Bhogle discharging copious amounts of tears on your clean new shirt).

On second thoughts, maybe it was his fault -- I can picture him as a small child saying, "Uncle, do you think stars are God's puppies? Isn't it wonderful the way they twinkle 'Woof! Woof!' all night long? Uncle, why are you looking at me that way...?"

Man, I can't wait to watch the match today and put this theory to test.

[*] Since this is a family blog, I don't want to speculate on the dark secret, but being the sadistic bastard that I am, I'll just throw in the words 'uncle' and 'broom handle'.

Tuesday, May 03, 2011

May 3, 2011

Two comments from RI that sum up the Osama Bin Laden kill:
So Public Enemy 1, on the run for 10 years, allegedly responsible for the most heinous crime on american soil, is whacked last night/early hours of the morning, DNA test taken, then dumped off a boat the same day, before I woke up. Are you f*cking kidding me?
and
I'd like to throw out this scenario:

Let's just say that both US and Pakistani intelligence have known of Osama's whereabouts for a long time.

And for SOME reason they have thought it in the best interest not to act on this information.

And this man Osama has been very ill for a long time.

One day Osama suddenly passes away.

What would the US do?

To announce the passing by natural causes of Osama?? (this would be an unsatisfactory conclusion to the US public, I'm sure)

Stage an operation and claim that he was killed in said operation?

Dispose of his body to prevent a cause of death from being established?

Pure conjecture, I know.
Natty Narwhal is the suckiest Ubuntu ever. Not just because of the new interface, but from a general stability perspective. Two days' worth of freezes and I'm back to 10.04 (for good, probably; now I know why they have LTS).

Is it just me, or does anybody else get the feeling that the IPL team owners sitting in their special thrones watching the match is the epitome of the rich/poor, elite/plebe divide and all that's wrong with our country?

Saturday, April 09, 2011

April 9, 2011

Trust The Pervie Painter to portray something as noble as Anna Hazare's anti-corruption drive in erotic terms. What's the need for a woman with a bare midriff leading the march? Also check out the glutes on the corruption monster.

Thursday, March 17, 2011

Raymond Davis freed

Raymond Davis, the CIA contractor arrested in Pakistan for murdering two people, has been freed by the payment of blood money. Two things worth mentioning:
  1. The sheer hypocrisy of the American government; on the one hand, Davis was part of the diplomatic corps (no matter that this claim was torn to shreds quickly, which probably led to the whole blood money option -- which, you have to admit, was a stroke of evil genius), and therefore enjoyed immunity against prosecution even for as heinous a crime as murder, while on the other hand:
    In 2004, Mrs. Clinton and the senior senator from New York, Charles Schumer, presented a Bill that advocated cutting foreign aid to countries who owed unpaid parking fines to the City of New York. Senator Clinton was obviously incensed by the fact that diplomats were abusing their privilege. Diplomatic immunity was never intended to allow diplomats to violate traffic laws of the host country, or for that matter, commit murders.

    She registered her discontent with diplomatic immunity and argued that it was not “acceptable for foreign diplomats and consular officials to hide behind diplomatic and consular immunity to park in illegal spaces in New York City and avoid paying parking tickets. It is my hope that this legislation will ensure that the City gets the money that it is owed.” Senators Clinton and Schumer were successful in amending the 2005 congressional Foreign Operations Bill in the Senate that froze foreign aid to countries by amounts they owed New York City in parking ticket violations and unpaid property taxes.

    ..

    In 1987, a car driven by the ambassador of Papua New Guinea, Kiatro Abisinito, hit four other cars in Washington, DC. The ambassador invoked diplomatic immunity. However, the US Attorneys prepared a criminal case against the ambassador for operating a vehicle while being intoxicated.

    Consider the case of Georgian diplomat, Gueorgui Makharadze, who in 1997 killed a 16-year old girl in a fatal traffic accident in the US. The diplomat invoked diplomatic immunity and was ready to leave when the Georgian President, Eduard Shevardnadze, ordered the diplomat to stay in the United States and face criminal charges. Mr. Makharadze was convicted by a court and served time in an American prison.

  2. The supreme irony of using Sharia Law to save Davis.

Monday, March 07, 2011

Lawyers protest against examination

From The Hindu:
Hundreds of train commuters on the Tambaram-Chennai Beach section were stranded on Sunday for over an hour as lawyers squatted on train tracks between St. Thomas Mount and Guindy Railway Stations... The agitators, who had come to the city from various parts of the state ahead of the All India Bar Examination, were protesting against it.

The nation-wide open-book objective-type qualifying test was held in English and several regional languages across the country.

<snip>

Soon after the examination began, disgruntled candidates stormed out of the exam venue, assembled on the railway tracks and roads outside.

<snip>

[The president of the Tamil Nadu Advocates Association] said that a test of this nature would expose the lack of knowledge of students from local law colleges when compared to those from schools of excellence.
Why am I not surprised? The so called local law colleges breed some of the most politicized and virulent forms of Collegius studentus in the city, specimens whose actions would make the Bus Day celebrators seem like five year old schoolgirls. Getting a strong grounding in law is the last thing on their minds, and expecting them to clear the exam is probably a bit too much. Here's what happened: they enrolled for the exam, paid the fees, and so on, and turned up at the exam center, and a cursory look at the question paper (I'm not even going to comment on the fact that it was a frigging open-book exam) was all it took to convince them that the money paid for the exam would have been better spent on, I don't know, booze and movie tickets.

Tuesday, March 01, 2011

Bus Day

The yearly ritual of hooligans college students commandeering buses and causing mayhem on the streets of Chennai is not just a law and order issue. It's a symptom of a deeper problem: the government's desire to keep the youth off the list of job seekers for another three years by getting them enrolled in worthless degree programs (not to mention building a support base for political parties). Everyone knows that these degrees lead to nothing except dead-end jobs as sales representatives and collection/verification agents zooming around recklessly on two wheelers -- on the same streets that bring bring back nostalgic memories of beating up bus drivers and stoning passersby and policemen -- but people still enroll themselves in these programs. The pittance that is charged as fees probably contributes to this, but a more important reason is the disdain for blue collar work. The same three years, if they had been spent acquiring vocational skills like plumbing, auto repair, refrigerator repair, and so on, would provide them with a solid career with decent wage potential, but no, they would rather study a bachelor's degree in economics, get barely passing grades (if at all they don't retain a set of 'arrears' in perpetuity) and go to work selling Eureka Forbes vacuum cleaners.

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.

Sunday, April 25, 2010

Must read for Farmville affcionados

Well, 'afficionado' doesn't really reflect my opinion of those who play this game, but anyway, this article is a must read. A choice passage:
My mother began playing Farmville last fall, because her friend asked her to join and become her in-game neighbor. In Farmville, neighbors send you gifts, help tend your farm, post bonuses to their Facebook pages, and allow you to earn larger plots of land. Without at least eight in-game neighbors, in fact, it is almost impossible to advance in Farmville without spending real money. This frustrating reality led my mother—who was now obligated to play because of her friend—to convince my father, two of her sisters, my fiancée and (much to my dismay) myself to join Farmville. Soon, we were all scheduling our days around harvesting, sending each other gifts of trees and elephants, and posting ribbons on our Facebook walls. And we were convincing our own friends to join Farmville, too. Good times.
Another worthwhile quote, this from an RI forum post:
Here are some recent FB updates from my circle of friends:
"Big Ben to the Raiders? I think you need a little more than just a sexual harrassment claim for your steet cred before acceptance here, beyotch."

"So the President just gave an intro to American Idol where he said to the contestants: "You're all my dogs!". 2010 rules sometimes."

"Farmville neighbors - I need 3 eggs, 1 blanket, and 5 bottles. Thank you very much."
Bliss really is unaware...
Enough said.

Saturday, April 24, 2010

Thoughts on the IPL Controversy

On one level, it's easy to dismiss the whole thing as a falling out between thieves and say no more, but certain facts stand out:
  1. Not giving Modi the requested five days or so to prepare his response is very fishy. After all, the guy has busted his hump organizing a glitch-free tournament (here's a thought: with the preparations for the Commonwealth Games going as well as they are, asking him to have a look at things -- only for the logistics, not financial -- would work wonders), and denying him this time smacks of vendetta. All the more so when you regularly see the respondents of a show-cause notice given a whole month to, well, respond to allegations against them.

  2. Sashi Tharoor did nothing that his colleagues (both in the ruling party and the opposition) don't indulge in on a daily basis; he only had the misfortune to get caught. The sheer hypocrisy of other politicians in baying for his blood is disgusting. Not holding a brief for him, but one needs to be fair.

  3. If everybody claims to be in favour of transparency, why would Modi releasing the details of the ownership patterns of the teams (which, BTW, is already out in the open, so I don't know what is hidden here) "complicate matters" and should not be done in haste? Which leads me to my next point.

  4. A fundamental issue is the transparency with respect to property rights. In India, it's practically impossible to figure out who owns what. It's not like in the States, for example, where any citizen can walk into the local administration's office and find out that the corner store is owned by so and so. Try doing this in India, and you'll be paid an unwelcome visit by unsavoury characters in the middle of the night. In fact, I'm not even sure this is legally possible here.

  5. Why the fsck don't we ban all transactions originating from entities registered in places like Mauritius? It's a given that these are nothing but fronts for corrupt scumbags. I know, the stock market will lose something like 50% of its value if we do this, but screw it -- rooting out corruption is more important.

  6. To think that all this is came out in the open because of a single intemperate 140-character web post is to dwell upon the delicious strokes of fate that the universe engineers for us mortals from time to time, irrespective of whether we are clueless celebrities addicted to Twitter or one of the 200,000 followers of these celebrities looking on with awe and wonder. Almost makes me believe in the Big Bang Theory.

Friday, April 16, 2010

Quote of the day

In baseball terms, the Contagion Team is at bat. Portugal is in the batter's box and Spain is on deck. Greece is on second base in scoring position. The EU is on the mound lobbing softballs while the IMF is in the bullpen warming up. Germany plays for team EU but refused to dress for the game.
-- Mish Shedlock

Friday, March 26, 2010

Obligatory IPL Post

  1. The level of commercial crassness has gone up (c.f. the middle-of-the-over ad intrusion). No surprises there.

  2. The slipping in of sponsors' names at the drop of a hat continues to irritate -- Citi moment of success, Karbonn Kamaal Catch (or is it 'Katch'?), and the worst of them all: the fricking MRF blimp that serves no purpose other than for the camera to be aimed at it and the commentators reading from the script ("do you know that MRF makes motorcycle tires too? MRF Pace Foundation blah blah Dennis Lillee blah blah 20 years blah de blah").

  3. What the hell is Mukesh Ambani's wife doing, sitting in the players' dugout with a bored yet stoic expression on her face? It's not like she's in the same boat as Preity Zinta, with a need to grab whatever chance she gets to be in the limelight -- she's got enough money to take out full page ads for a year with her portrait on them, for heaven's sake.

  4. Testing the patience of the viewers eager to know the third umpires' decision by delaying the result with animations of flying jets is not a Good Thing. In fact, empirical studies have shown that such practices may result in an 8% drop in airline passenger revenues. To be fair, the Kingfisher ad featuring the singing players is almost as good as the zoozoos.

  5. What's up with Indian spectators? All you have to do is train a camera on them, and they faithfully prove Darwin's theory over and over again.

Monday, March 15, 2010

One-line question; 8000-page reply

From The Hindu:
It was quite literally a bundle of a reply that left its recipient flummoxed. Choudhary Rakesh Singh Chaturvedi, Deputy Leader of the Congress Legislature Party in Madhya Pradesh, received a reply running into 8,000 to 10,000 pages to a one-line question he had asked in the State Assembly. The bundles of paper were sent to his home through an autorickshaw.

Mr. Chaturvedi called it a “cruel joke.”

“During the monsoon session on July 7, I had asked a question to which the State Housing and Environment Ministry last week sent me a reply in the form of number of huge bundles,” he said. The reply came early this month.

Mr. Chaturvedi said he had asked Housing and Environment Minister Jayant Malaiyya to state the names of industrial units which were issued No Objection Certificates from January 2006 to December 2008 regarding permissible emission limits.

“I was astonished when eight to 10 bundles containing the answer were delivered at my residence,” he said
Technology provides a way to deal with such intransigent babus: ask them for the documents in soft copy, host the entire thing in a server, and let the crowds pick them apart. Oh, and by the way, ten years' hard labour for any bureaucrat exposed because of this scrutiny (twenty years for the smartypants who came up with the 'let's send them an autorickshaw full of documents' idea).

Sunday, March 14, 2010

The world's first green legislature building

Instead of shouting from the rooftops about the world's first green legislature building -- a singularly worthless distinction -- how about spending similar effort on taking care of the people's problems for a change? Making sure that commuters are not put to hardship because Mount Road was shut down for three fricking hours so that the Security Liabilities can whiz by in their cavalcades would be a good start.

Saturday, March 06, 2010

Let it go

To all the people bemoaning the step-motherly treatment being meted out to hockey and writing letters to newspaper editors in anguish: let it go. Face it, hockey's heydays are over; people have voted with their feet and wallets, and the -- ahem -- national game lost its deposit. The best thing to do would be to strip the game of this meaningless title and allow it to claim its rightful place, which I surmise would be somewhere between kabaddi and kho-kho.

The reasons for hockey's demise are quite obvious: the resources needed to play this game are beyond the grasp of most people (as opposed to cricket, where all you need is a rubber ball, a plank of the right size, and some chalk to draw the stumps on a gully wall). Also, maybe it's just me, but watching a hockey game is pretty much an exercise in frustration: compared to a football game, there is very little scope for a good rhythm or flow to build up -- the referee's whistle blows with a much higher frequency than football ("Did the ball touch your feet? Sorry. Oh, did you touch the ball with the wrong side of your stick? Oops." You get the picture).

Thursday, March 04, 2010

Ahem

About the tracks displayed on the right: no, I haven't branched out to the nursery rhymes genre -- it's my daughter's Amarok playlist.