Sunday, November 22, 2009

Facebook killed the blog

I used to write blogs. Now I just update my status on facebook. Did facebook kill the blog?

Wednesday, September 09, 2009

Paul Graham:
The main point of essay writing, when done right, is the new ideas you have while doing it. A real essay, as the name implies, is dynamic: you don't know what you're going to write when you start. It will be about whatever you discover in the course of writing it.
So true.

Wednesday, September 02, 2009

German Tank Problem

A very interesting estimation problem I stumbled upon:
Suppose one is an Allied intelligence analyst during World War II, and one has some serial numbers of captured German tanks. Further, assume that the tanks are numbered sequentially from 1 to N. How does one estimate the total number of tanks?
Read this guardian article for the interesting story about how this was a real problem in World War II and how the solution helped Allies win the war. Read the solution on wikipedia or this blog. The intuition is that the maximum of the 'captured' serial numbers as well as the number of captured serial numbers can be used.

Tuesday, May 12, 2009

Fullscreen Flash problems in Ubuntu 9.04

Recently I upgraded from Ubuntu Intrepid to Jaunty (9.04). Things are great, especially the boot time (my computer boots consistently in 15-20 secs since the upgrade). But somehow since the upgrade flash videos on websites like youtube, hulu etc have had problems with fullscreen view. The video becomes seriously choppy when seen in full screen mode and the usual reinstall of flash plugins didn't seem to make it any better. This was quite annoying especially since this issue didn't exist in Intrepid (8.10) or previous versions of Ubuntu.

After a bit of web search, I finally stumbled on the right solution. The solution, as usual, was on Ubuntu forms in this post and in bugs.launchpad.net here. In short, do "lspci -vv" and find the VGA output. Then find the right address to be added in the file /proc/mtrr. Apparently, the write-combining method of accessing the MTRRs has been affected due to a missing line in /proc/mtrr file. Adding the right range for write-combining lets the graphics card work much better.

I followed this method. Find the 'prefetchable' memory range and substitute in the 'echo' statement to the file /proc/mtrr.

And enjoy watching the daily show in full screen again!

Thursday, April 30, 2009

Important day today

wish me luck!

Wednesday, February 25, 2009

And I used an english word in my code

Sometimes even a commonly used word seems so strange when we look at it in an unfamiliar setting. Today, I happened to use the word 'reason' in my python code [1] as a name of a class. And so, out of habit, I named it with the first letter in capitals - Reason(). And it looked strange. It felt like either the spelling was wrong or I don't know that word very well [1]. It looked so distant.

I guess the usage of a normal English word as a variable name in the code was unexpected. Having been looking at variables named 'curr_chan', 'curr_state', 'rcv_pkt' etc, a fully formed word like 'Reason' just seemed out of place. Such is the human mind...

[1] - No pun intended :)

Thursday, January 22, 2009

The charm of Opera

An aria named "Ah mes amis - Pour mon âme", sung by Juan Diego Florez.



Also watch this piece with Pavarotti and others enjoying themselves. His facial expressions are priceless, apart from the voice of course :)
You don't know jack, unless you know Brainfuck!