Linux: God's workstation is one!

tux_compA long journey for freedom of information and a collaborative community without walls, Linux is 20+ in age now. The omnipresent open-source operating system which can even be made to work on a future device with lesser effort than any other of its kind has proved that technology needs to be more open than controlled and hidden and overpriced.

Android running on the Linux kernel is the most used smartphone on earth right now and comes at a lesser cost than any other comparable device on proprietary platforms (you can have an Android smartphone at $130… what beats?). If iPhone says – “God probably has one”, Linux can definitely say – “God’s workstation is one”. At least I haven’t heard any news of God reaching down to Microsoft or Apple customer support yet. He must have downloaded a Linux distro and been using it ever since modifying it to his own needs.

Wish Linux all the best and huge growth in coming years as well. Playing with it since school and today it’s my means of earning daily bread and butter ;).

A good article on the history and relevance of Linux can be found here.

Scorsese's film list

Found a list of select films from Martin Scorsese, the most accomplished director today. The “need to see to know anything about film” sounds a bit far-fetched and may be a publicity stunt but an excellent list without doubt.

Found quite a few I haven’t watched yet. So it’s going to be a good list of downloads after an intermediate break.

Dijkstra's railway car toilet parable

Hilarious and enjoyable. Read on…

(Recently I found the following text in manuscript among old papers of mine. It must have been written in the middle of 1973, but I don’t think that in the intervening three years it has lost anything of its significance. Hence I now incorporate it in the EWD-series.)

A parable.

Years ago a railway company was erected and one of its directors —probably the commercial bloke— discovered that the initial investments could be reduced significantly if only fifty percent of the cars would be equipped with a toilet, and, therefore, so was decided.

Shortly after the company had started its operations, however, complaints about the toilets came pouring in. An investigation was carried out and revealed that the obvious thing had happened: despite its youth the company was already suffering from internal communication problems, for the director’s decision on the toilets had not been transmitted to the shunting yard, where all cars were treated as equivalent, and, as a result, sometimes trains were composed with hardly any toilets at all.

In order to solve the problem, a bit of information was associated with each car, telling whether it was a car with or without a toilet, and the shunting yard was instructed to compose trains with the numbers of cars of both types as equal as possible. It was a complication for the shunting yard, but, once it had been solved, the people responsible for the shunting procedures were quite proud that they could manage it.

When the new shunting procedures had been made effective, however, complaints about the toilets continued. A new investigation was carried out and then it transpired that, although in each train about half the cars had indeed toilets, sometimes trains were composed with nearly all toilets in one half of the train. In order to remedy the situation, new instructions were issued, prescribing that cars with and cars without toilets should alternate. This was a more severe complication for the shunting people, but after some initial grumbling, eventually they managed.

Complaints, however, continued and the reason turned out to be that, as the cars with toilets had their toilet at one of their ends, the distance between two successive toilets in the train could still be nearly three car lengths, and for mothers with children in urgent need —and perhaps even luggage piled up in the corridors— this still could lead to disasters. As a result, the cars with toilets got another bit of information attached to them, making them into directed objects, and the new instructions were, that in each train the cars with toilets should have the same orientation. This time, the new instructions for the shunting yard were received with less than enthusiasm, for the number of turntables was hardly sufficient; to be quite fair to the shunting people we must even admit that according to all reasonable standards, the number of turntables was insufficient, and it was only by virtue of the most cunning ingenuity, that they could just manage.

With all toilets equally spaced along the train the company felt confident that now everything was alright, but passengers continued to complain: although no passenger was more than a car length away from the nearest toilet, passengers (in urgent need) did not know in which direction to start their stumbling itinerary along the corridor! To solve this problem, arrows saying “TOILET” were fixed in all corridors, thereby also making the other half of the cars into directed objects that should be properly oriented by the shunting procedures.

When the new instruction reached the shunting yard, they created an atmosphere ranging from despair to revolt: it just couldn’t be done! At that critical moment a man whose name has been forgotten and shall never be traced, made the following observation. When each car with a toilet was coupled, from now until eternity, at its toileted end with a car without a toilet, from then onwards the shunting yard, instead of dealing with N directed cars of two types, could deal with N/2 identical units that, to all intents and purposes, could be regarded as symmetrical. And this observation solved all shunting problems at the modest price of, firstly sticking to trains with an even number of cars only —the few additional cars needed for that could be paid out of the initial savings effected by the commercial bloke!— and, secondly, slightly cheating with regard to the equal spacing of the toilets. But, after all, who cares about the last three feet?

Although at the time that this story took place, mankind was not blessed yet with automatic computers, our anonymous man who found this solution deserves to be called the world’s first competent programmer.

*         *         *

I have told the above story to different audiences. Programmers, as a rule, are delighted by it, and managers, invariably, get more and more annoyed as the story progresses; true mathematicians, however, fail to see the point.

Plataanstraat 5
The Netherlands
prof.dr.Edsger W.Dijkstra
Burroughs Research Fellow

Source. All the transcriptions. The collection is invaluable.

Android handwriting recognition software

android_compOne of the things I miss most in Android in spite of all its goodness is a good handwriting recognition software. The ones I found either need the stylus or support OEMs only. Thinking of writing one with support for finger touch and releasing it as an app in the Android Market but don’t have all the time required to spend on it. Anyone interested is welcome. I have a rough sketch of the algorithm and can proceed with it.

Update: Google Gesture Search recognizes handwriting on Android.

Returning home…

cool_penguin_smallThe prospect of going home brings such joy. Returning home this March for two weeks. Counting the days and planning has already begun. As a bonus, this time no errands to run… so looking forward to a cool and carefree vacation. Also, will meet my youngest sister after one and a half years! Since she left to pursue her M. Tech. the visits never concurred. Will be watching Hugo, The Adventures of Tintin and The Secret World of Arrietty with family this time. Dreaming about the delicious homemade cuisines as well.

A beautiful excerpt from Browning's "Paracelsus"

…at times I almost dream
I too have spent a life the sages’ way,
And tread once more familiar paths. Perchance
I perished in an arrogant self-reliance
Ages ago; and in that act, a prayer
For one more chance went up so earnest, so
Instinct with better light let in by death,
That life was blotted out—not so completely
But scattered wrecks enough of it remain,
Dim memories, as now, when once more seems
The goal in sight again. All which, indeed,
Is foolish, and only means—the flesh I wear,
The earth I tread, are not more clear to me
Than my belief…

How to remove PulseAudio on Ubuntu 10.10

I am still using Ubuntu 10.10 (Maverick Meerkat) as Unity/Gnome3 sucks. I was looking for a way to remove the userspace pulseaudio from Maverick.

To remove pulseaudio completely:

$ sudo apt-get purge libcanberra-pulse pulseaudio pulseaudio-esound-compat
pulseaudio-module-bluetooth pulseaudio-module-gconf pulseaudio-module-udev
pulseaudio-module-x11 gstreamer0.10-pulseaudio pulseaudio-utils pavucontrol

This will remove pulseaudio from your system and it will also remove your volume applet on your top panel. To get back your audible world:

$ sudo add-apt-repository ppa:dtl131/ppa
$ sudo apt-get update
$ sudo apt-get install gnome-applets gnome-media gnome-settings-daemon libcanberra0

Restart Ubuntu.

Placing Firefox cache in RAM on Ubuntu

firefoxTo enhance Firefox performance on Ubuntu (or Linux), we can place the cache in RAM. This is especially helpful if you are used to hours of continuous browsing sessions.

I have mounted some directories with temporary files using the tmpfs, which is RAM based filesystem. These files will be discarded at reboot, which also helps to keep my system clean.

The entries in /etc/fstab are like:

tmpfs /tmp tmpfs noexec,defaults,noatime,nodiratime 0 0
tmpfs /var/log tmpfs noexec,defaults,noatime,nodiratime 0 0

Add the following line at the end of /etc/sysctl.conf file:

vm.swappiness = 0


# sudo sysctl -p

In Firefox, go to about:config page and search for the following entry:


If it is not there, right click and create a new String value and name it as


Set the value to /tmp (or tmpfs directory of your choice). Restart Firefox.

Hacking broadband on Linux


1. To check my actual network IP address:
2. A dictionary of common router passwords:
3. nmap and whois tools available in Linux. [Try “nmap –help” for quick description of the switches available. whois is self-explanatory.]


If users do not take necessary precautions, it’s too easy to reach the router settings of broadband users.

First I checked my actual IP address @
I found that it is

So I ran nmap on this range on port 80:

$ nmap -p80 > scanres

I opened the file scanres in vi and searched for “open”. I found the following entries:


In order to check some more information like who the IP belongs to, I used:

$ whois

Now I have got a vulnerable IP with port 80 open. I tried opening it in Firefox and it asked for the username and pwd:


I tried out default usernames and pwds for some common routers in India from and I could hack into the router in 4/5 tries. [Sometimes the authentication string shows the make of the router. For example TD-W8901G means a TP-Link router, IB-xxxxx means an IBall router. Some manufacturers must be real dumb to do it!] I entered the Interface Setup and could find the PPPoE username. And an 8-dot password almost always means “password”. As users have no way of changing it, the “password” is as good as hard-coded.


Finding a weak router will take around 40 seconds for a seasoned hacker who will reduce the IP range +/-25 his own IP as the nmap scan range.