Thursday, December 24, 2009

The Apples and Oranges Puzzle Solution

Pick a fruit from the box labeled ‘Apples and Oranges’. This box HAS to have only apples or only oranges. Suppose you get an orange. Now, this box has to be ‘Only Oranges’. The box actually labeled ‘Only Oranges’ has to be ‘Only Apples’ and the box labeled ‘Only Apples’ has to ‘Apples and Oranges’. Similar solution if you pick and apple.

Problem.

The Apples and Oranges Puzzle

There are three boxes. One of them has only apples. One of them has only oranges. And the third one has both apples and oranges. The boxes are labeled but, and here is the important part, they are ALL labeled incorrectly. Of course, since it’s a puzzle you can’t look inside the boxes and find out which is which. What you can do is pick one fruit and only one fruit from any box of your liking. With this single sampling, can you tell correctly which box is which? And how?

Solution.

Monday, December 07, 2009

The Allure of Video Games

Let me briefly summarize why people like playing video games (computer games, gaming consoles of all kinds included). Feel free to add more in the comments.

1. Fantasizing: People like living imaginary lives. In a game, you could be anything. A soldier, a thief or an ancient warlock. People can never be in real life.

2. Making second choices: Games give you a chance of correcting what you did wrong. You can go back and play that level again. Real life doesn’t give you second chances.

3. Attainable goals: Games give you goals that are attainable. If a goal is not attainable you make them so by shifting the slider to the ‘easy’ or ‘noob’ level. Goals in real life don’t have adjustable difficulty. Sometimes goals aren’t even well defined. Sometimes there are no goals, let along attaining them.

Saturday, November 28, 2009

Profit and Laws

Let me suggest a simple way to make profit. Buy guns. Hold them to peoples's heads and ask for money. Pretty profitable, I should guess.

But you can't do that because there are laws prohibiting such behavior. Laws are important in deciding how profit can be made.

Yes, I am stating the obvious. :)

Friday, November 27, 2009

Why Mozilla Just Might Get it Right

In the beginning, there was the Internet Explorer. There was nothing great about it, but it was pretty much the only decent web browser out there. It came bundled with Windows and did what it was supposed to do – display web pages. Everyone used it. But no one paid too much attention to it, because the web wasn’t BIG. There was no facebook, or youtube and google was in its infancy.

Then web 2.0 happened and with that Firefox happened too. Opera was always lurking somewhere in the background. But Firefox really “got” the web. They knew that users didn’t need a clutter of options – they just needed use the internet. They also knew that every user had different needs. Which is why they had addons for almost everything under the sun. And firefox slowly gobbled up the big e.

Then chrome happened. Google became big and decided that they needed their own browser to do the stuff that they wanted to do on the internet – heavy javascript. So chrome focused on running javascript – fast. Somewhere in the background, IE woke up and brought in tabs and web slices and other shenanigans. (But they still don’t get it. Do they really expect web slices and Silverlight to replace flash and javascript? And what about speed?!) Opera and safari trudged along too.

And now people are talking about how Chrome might kill Firefox. After all, chrome is minimal, it’s going to have extensions soon and it’s FAST. It’s backed by google. It is actually being advertized. And did I say it was FAST?

However, I recently read how Mozilla is planning to kick the login’s butt. This reminded me that Chrome, IE and Safari and inextricably linked to their parent companies interests. On the other hand Mozilla is FREE. They can dare to think about doing things other browsers cannot. They don’t need to lock the user in. They don’t need to drive the user to specific services.

And that, my friends, is the reason Mozilla just might get it right, after all.

(In case you’re shouting ‘Mozilla is funded by Google’; shout away. I still think Mozilla has maintained it’s freedom.)

Tuesday, November 24, 2009

Evaporative Cooling

Just wanted to throw an idea out. Much is said about evaporative cooling on wikipedia. I think this technology has a lot of potential in a country like India where power is scarce and heat is abundant. I wish someone would deploy this on a mass scale -- central cooling etc.

Monday, November 23, 2009

Why the US Fails to Inspire Me

My friends wonder why haven’t written much since I came to the US. Before coming here, I used to be an infrequent but regular writer. But now, the writing seems to have dried off completely. (This blog is actually an effort to keep some semblance of writing going.)

I think that’s because I’m in a surrounding that I know nothing about. In India, everything used to inspire a story. I knew the people on the streets. I knew what their story was. A 14 year old bus conductor speaking half-English half-Hindi was intriguing. A pan-wala knowing the richest loan shark of the city was intriguing. And I knew how these things could be true. I knew how they could happen. I could write about them.

In the US, I know nothing. I look at faces and they are just faces. I don’t know their back stories. When I see a woman with long hair done into a choti, I don’t know why she’s dressing unlike other women around. When I see a homeless guitarist on the street, I don’t know where he sleeps at night. I’m afraid to walk into the back-alleys of this country and discover its dirty secrets.

And that, I think, is why I can’t write anymore.

But on the other hand, that might be the very thing to write about. :)

Saturday, November 14, 2009

Profit and Ownership

Case 1
Say I have 100 rupees. You come to me and say, hey, Vinod, lend me those hundred rupees. I will go buy potatoes and flour and masalas and make samosas and sell them for a profit. You can take a cut. How about ten percent?

I ask for 20 and we settle down on 15. You take the 100 rupees, make samosas, sell them and make 50 rupees in profit. I get my 100 rupees back. I also get a cut of 7.5 rupees from the profit. And you end up 42.5 rupees richer for your toil. Everyone’s happy.

Case 2
I have 100 rupees. You walk sneakily into my room and take that 100 rupee note. You go buy potatoes and flour and masalas and make samosas. You sell them for profit of 50 rupees. Then you sneak back into my room and replace that 100 rupee note. Since I’m a careless idiot, I never even notice. You end up 50 rupees richer. I don’t even know what hit me but since my 100 is still there, I’m good.

Functionally, nothing changes between these two scenarios. Samosas still get made, customers still get to satisfy their lust for spicy cuisine, and you still make profit. And yet, in onc case I end up richer and in another I do not. Why is that?

The difference, I think, is because in Case 1, I’m able to claim ownership of those 100 rupees. I’m entitled to a share in profits, even though I did not participate in any productive activity, merely by virtue of owning those 100 rupees. In the second case, no such ownership is established and I get no profit.

I’m able to establish ownership because I have control over the money. In Case 1, I most probably keep the money under lock and key so you can’t sneakily ‘borrow’ it. In Case 2, the money is up for anyone to grab. Therefore, no profit.

Put this way, the notion that I should get profit for mere ownership seems a little absurd. I didn’t make the samosas. I didn’t sell them. Then why should I get the profit?

What do you think?

Friday, November 13, 2009

The Array Multiplication Problem Solution

Use logarithms. They allow us multiply / divide numbers without using multiplication or division.

Find S = log(A[0]) + log(A[1]) + ... + log(A[N]). This takes O(n) time.
Set B[i] = antilog(S - log(A[i])) where i = 1:N. This also takes O(n) time.

B[i] = antilog(S - log(A[i]))
B[i] = antilog(log(A[0]) + log(A[1]) + ... + log(A[N]) - log(A[i]))
B[i] = antilog(log(A[0] * A[1] * ... * A[N] / A[i]))
B[i] = A[0] * A[1] * ... * A[N] / A[i]

The Array Multiplication Problem

Given: an array A of size N. Find the output array B, also of size N such that B[i] is the product of all elements of A except A[i]. That is,

B[0] = A[1] * A[2] * ... * A[N]
B[1] = A[0] * A[2] * A[3] * ... * A[N]
...
B[N] = A[0] * A[1] * ... * A[N - 1]

You have to do this in O(n) and WITHOUT using the division operator. :D

Solution.

Thursday, November 12, 2009

What's Wrong with the KDE4 Panel

As some of you might know, I moved away from KDE4 quite a long while ago. I gave KDE 4.3 a spin with Karmic but still no joy. It just isn't working for me. Here's an example of why. Shown below is a screenshot of KDE4 on Arch Linux.


Look at the panel. It's big. Not only is the panel itself big, everything on it is big too. The clock is huge, we have gigantic tasks in the taskbar and absolutely monstrous start menu and quick launch buttons.

This is good if the user actually wanted it that way. But if I'm increasing the size of the panel, 9 times out of 10 I want to fit more stuff onto it, not make everything bigger. If I wanted to make everything bigger, I'd just change the screen resolution or get a bigger monitor. What I most probably want is to fit more tasks in the taskbar, more icons in the system tray and more quick launch icons. The current implementation doesn't leave much room for me to do that.

Wednesday, November 11, 2009

The 100 Floors Egg Dropping Puzzle

This one’s a classic. I don’t even know why I’m putting it here. But before we proceed, I’d like you to take a look at this awesome puzzle site. All puzzles on my blog are shamelessly lifted from there. :P

The Problem
So, the puzzle goes like this. You have two identical eggs. And you have a 100 storey building. The eggs could be very strong or they could be very weak. So, they could break when dropped from storey 1. Or they couldn’t break even when dropped from storey 100. You have to find out the lowest storey such that when an egg is dropped, it breaks. How can you do this in the minimum number of tries?

The Solution
The simplest solution to this problem is, well, simple. You drop an egg from storey 1. If it breaks, you know. If it doesn’t climb to storey 2 and repeat. Then to storey 3 and so on. This approach will take minimum 1 tries and maximum 100 tries. Not good enough.

But we have two eggs. Suppose we drop the egg from storey 50. If it breaks we know that the culprit storey is somewhere between 1 and 49. If it doesn’t we know it’s between 51 and 100. Then we can use the other egg to check which one. This way, we can get a minimum of 2 tries and a maximum of 51 tries. Slightly better, I guess.

Can we do even better?

Sunday, November 08, 2009

UNICEF Greeting Cards

Saw some UNICEF greeting cards at a store yesterday. The packaging had the following text on it
UNICEF has helped more underprivileged children than any other humanitarian organization in the world.
Okay. Good. But considering this was on an item up for sale and to an extent amounted to advertising:

1. Does helping more children somehow make you 'better'?
2. Do you mean to imply that I should not contribute to other humanitarian organizations because they help lesser number of children?
3. Is humanatarianism a competition? Why are you comparing yourself to others?

Thursday, November 05, 2009

The Married Guy Puzzle

Amar is looking at Akbar and Akbar is looking at Anthony. Amar is married and Anthony is not. Is a married guy looking at an unmarried guy?

  • Yes
  • No
  • Cannot be determined

While the answer may look obvious to some, they'd be surprised at how many people (including myself) answer this incorrectly.

Belief

When I look back (not that I have too many years to look back to), I see many things that have changed over time. In particular, I tend to think of my high-school days, when I was kind of an over-achiever. I had certain habits that helped me do that and I sometimes like to think what they were and inculcate them back.

So one thing that I had at that time was belief. Of course, I was young enough and naïve enough at that time to have it. I believed that I was special and that I was here to do something special. What exactly, I had no idea. But I had this nagging feeling all the time that life was going in the right direction. That I was doing what I was meant to do. And that I was meant to do something.

This belief stemmed from my belief in a greater meaning to life. I believed that there is some consciousness out there which created a plan that we were all playing out our roles in it. Somehow it felt good to know that everything was just as it was supposed to be.

As I grew up, I lost that faith. First the faith that there is a supreme being. Also the faith that I’m meant to do something special. I became the ordinary. And life became a lot less fun to live. These days I find it really hard to get excited about anything. Even if I do, I wonder what meaning does it have. Isn’t that sad? Wasn’t it better to be deluded but happy?

I wonder why people say delusions are never good.

Tuesday, November 03, 2009

The Five Cap Puzzle Solution

A lot of people provided solutions on fb. I'm posting some of them. They are quite elaborate. Save me the time to write it up. :)

By AD:

Black, the only way the last one can be sure of the hat on her head is if both the one's in front of her are white. So we can conclude that they are not. Thus, if the hat of the first one was white, the second one could safely have said hers was black, but since she doesn't do that, the first one can only be black.

By AD2:

Assumption: Each woman can hear the reaction of the others when they answer the question.

Now, Looking from the last woman's position. there is only one case when she can definitely tell which cap is on her head. The situation will be WWB ( from first to third). Ruling out this situation, now we get to the second woman, she knows that the third one behind her does not know the color of her cap. She also knows that had the color of the cap of the woman in front of her ( the first woman) been white, then there is only one case that the third woman would have been unaware of the color of her cap. Meaning, the second woman would have known the color in that case. But she does not too. This rejects the second case of WB(W/B). The last two cases in which both the second and the third woman do not know the colors of their respective caps, have the first woman wearing a black cap only. Thus hearing from the second woman that she also cannot determine the color of her cap tells the first woman for sure that her cap is Black.

There you go, BLACK is the answer.

By KS:

Since there are only two white caps and three women, at-least one of them is wearing black. If the last women sees two white caps in front of her, she knows, she herself is wearing black, and declares.

If she is keeping quite, that means, the two women in front are either wearing both black or one white and one black. Now if the middle woman sees a black cap in front of her, she doesnt know if she herself is wearing black or white. If the middle woman sees a white cap in front of her, she knows she herself is wearing black.

Since second lady is keeping quite, the cap on the third lady is black and the third lady comes to know.

Monday, November 02, 2009

The Five Cap Puzzle

There are five caps. Two of them are white and three of them are black. Three women are sitting one behind the other such that the first one cannot see the two behind her, the second one can see the one in front of her but not the one behind her and the last one can see both women in front of her.

The caps are randomly put on the heads of these women such that none of them can see what cap went where. Of course, once the caps are put, they can see the cap on the head of the woman/women in from of them. That is, the first one cannot see any, the second one can see one in front of her and the last one can see both in front of her. Also, they can't see what cap is on their own head.

The last one is then asked if she knows what colored cap is on her head. She says no. The second one is then asked if she knows what colored cap is on her head. She says no too. The first one is then asked the same question. She says yes and is able to tell the color of the cap on her head.

How and which color?

Solution.

Monday, October 26, 2009

Archetypes in Lost

I’ve been completely hooked to lost these days. Since the show can broadly be classified as fantasy, I thought it might be a good idea to see what archetypes the major characters fall into.

Jack Shephard: He’s the Hero. He’s group oriented. Live together, die alone is his motto. For him, the group is more valuable than individuals.

John Locke: He’s the Hunter. He has acute sensory prowess. But what really is remarkable about him is his intuition or sixth sense. He believes that there is a higher purpose to his life and believes in following the ‘signs’.

Sawyer: He’s the anti-Hero. There is little about him to like. He’s a cheat, a con-man who cares only about his own petty interests. And yet, we pine to know his story.

Sayid: He’s the Soldier. Infused with a black-and-white sense of morality, he takes upon himself to fight and protect. He isn’t proud what he has to do in the line of duty and is deeply nostalgic about people he’s had to lose or leave behind.

Ben: He’s the classical Trickster. You can’t trust him on anything. There’s no telling what his words really mean or what his intentions truly are. And yet, if he gives you his word, he’ll follow it. Ironic, isn’t it?

Sunday, October 25, 2009

Supplying Water

I did my bachelors in civil engineering. This meant that somewhere in the third year, we had a course on supplying water.

Now designing a water distribution system is a fairly simple process. First, you estimate the population. If you’re designing for the future, you might use a 25 or 50 year projection of what the population will be. Then there are standards for the per capita consumption. Standards for how many water outlets each house should have, what the pressure at these outlets must be.

Once all this design data is known, you design the water supply system so that water is available at all these outlets in the desired quantity and at the desired pressure head.

But there is something fundamentally wrong with this approach. It assumes that adequate amount of water is available for you to supply water 24x7 in this manner. In India, this is hardly ever the case.

In India, in most regions, water is available in a very limited quantity. My own house in Indore gets water for about 1 to 1.5 hours every alternate day. That too at a pressure that can’t even rise above the ground floor. Different regions of the city get water at different times and in different quantities.

Clearly, what needs to be designed by the engineer is not what is taught in the classroom. We need to learn how to schedule the water supply. We need to learn how to prioritize supply regions, supply times and supply volumes. Of course, none of this is taught. Most probably because that kind of knowledge doesn’t even exist.

I know that water is a big political issue in India. Who gets water and when and how much they get it is largely a political decision. But even in an ideal world, where one would want to ensure equitable and optimum distribution of water, the know how to do it doesn’t even exist. I find that somewhat disturbing.

Saturday, October 24, 2009

Bad Writing in Bollywood

I think Bollywood has some very good talent. We have great actors, great technicians, great musicians and some really fabulous directors. What we lack are script writers.

When I go to a Bollywood movie, there’s not thing that irks me more than the lack of a script. An example that immediately comes to mind is Chandni Chowk to China (CC2C) which I watched on the airplane on my way back to the US last month.

It’s a nice brainless comedy, something that you’d enjoy when you have nothing to do. And I have nothing against such movies. But consider, for a moment, an important plot point. Sidhu’s martial arts teacher tells him – I don’t fear those thousand moves you’ve practiced once. I fear that one move that you’ve practiced a thousand times.

Sidhu is reminded of this advice in the climactic moments of the movie, when he’s being beaten black, blue and red by the villain. Clearly, it’s an important plot point. Something that would have hooked the viewers on. Sidhu is a cook. The writer needed to turn a cooking move into a martial arts move. Something , that I think, will be rather easy with a day or two or brainstorming. That’s what I was expecting. What do we get instead? A set of moves that have nothing to do with Sidhu’s past profession. Or even his training sessions with his master. Just some random choreography of fight sequences.

That’s bad writing. That single thing took out all the joy from the movie. When will Bollywood learn to pay attention to details?

Wednesday, October 21, 2009

Quirky Python Behaviour on Ubuntu

So my good friend AD is messing around with Python these days. You know, basic variables and loops and stuff. So he does some stuff with strings and naively names the file string.py and saves it in his home folder.

Done with this brainwork for the day, he fires up rhythmbox to listen to some music. The busy cursor shows and nothing else comes up. Since I'm the only linux 'expert' in sight he turns to me for help.

I advise him to run rhythmbox from the command prompt and tell me what the error messages are. He does that and receives a segmentation fault with random garbage from the python exercises he was doing earlier.

What was happening here was that python was treating the string.py in as the default string module. Or maybe it's a rhythmbox thing. Or an Ubuntu thing. In anycase, it seems like a stupid thing to give precedence to random stuff lying around in your /~. Is this a feature or a bug?

Monday, July 27, 2009

The Boy Who Would Live Forever


The Boy Who Would Live Forever is the fifth novel in the Heechee Saga by Frederick Pohl. And being the fifth of its kind, it is very much like watching the third sequel of Jurrasic Park or Mission Impossible. The author really has nothing new to say and is perhaps writing in the hope that people who liked the other Heechee novels would buy this one too because it’s a Heechee novel.

Nothing much really happens in the story. The plot itself is insipid. Wan, the orphan boy who’d been found by the Harter-Hall party has become very rich and slightly psychotic. He is hell bent on taking revenge with the Heechee, for what reason, it’s not very clear. And in the end people manage to stop him from destroying the Heechee in the core. Neat.

Having finished reading the entire series, I believe there are serious flaws in the world that Pohl has imagined. One, there is a complete absence of politics in this world. The main organizational entities in the galaxy seem to be space exploration companies. These companies seem completely independent of any government control (which is the capitalist idea that might just be plausible) and also infinitely fair and just in the way they carry out their affairs (which seem a lot less likely). Individuals with capital seem to be in complete control of everyone’s life, without any public support at all.

Even economy-wise, there are severe flaws. Wealth almost always seems to correspond to material wealth. Energy and information don’t seem to be commodities at all. Information wasn’t a commodity in Pohl’s time, yes, but energy very much was, he should have figured that in. For example, the machine intelligences in his stories own themselves if they own their hardware. What about the energy to run this hardware? Who own the ‘bits’ or the software of these machine AIs?

But the first few books who didn’t deal too much with machine life or with the Heechee themselves were good. Starting the series is highly recommended, just stop when you start getting bored.

Sunday, July 12, 2009

Torchwood Children of Earth


The 2009 series of Torchwood was a mini-series composed of just 5 episodes. Each of these 5 episodes were telecast on consecutive days within a single week. I think the format was unusual but it did result in a spectacular storyline and a plot that kept the viewers at the edges of their seats all along.

Grittier than Usual
Although Torchwood is a Dr. Who spin-off it does have a gritty, semi-adult tone. The stories don’t always have happy endings. The main character – Jack Harkness – rends your heart apart at times. But even then, ‘Children of Earth’ was grittier than usual. It forced the audience to face a lot of difficult question. Do the needs of many really outweigh the needs of a few? It is okay to sacrifice one life for the sake of one million? What if the proportions are different? What if you had to sacrifice a million lives to save billions? Would the decision still be all that clear cut?

I think that’s the central question that ‘Children of Earth’ makes us ponder about. Unfortunately there’s no straight answer to that. Your eyes well up with tears with Jack Harkness’s as in the climactic moments he is forced to take a very difficult step indeed.

But fortunately in the real world, it seldom comes down to such clear cut mathematics. Often there are ways to benefit everyone equally. The only thing it takes is wisdom and compassion. An injury to one is an injury to all. That’s the lesson we take away from Children of Earth.

Jack Harkness
The character of Jack Harkness fascinates me. For one, he’s the first gay lead character that I’ve seen on television. His romance with Yanto Jones, another lead character on the show, is touchingly portrayed. The show portrays gay people as utterly normal, so much so, that you hardly ever even think about the fact. Just like you’d never think about a straight person’s sexuality and take it for granted. That, I think, is one of the major achievements of the show in general.

But more than that Jack Harkness is also a man who cannot die. So we has to face the staple science fiction-ey problems of outliving his loved ones and hiding his true identity from those who cannot know about it. But there is another, more unique problem he faces. In his role as a Torchwood operative, he is forced to take decisions that other, normal people would not take. And that’s because while normal people wouldn’t be around to face the consequences of their decisions, Jack Harkness would always be. If he chooses to fight the aliens and not sacrifice a million children, the world may be destroyed. Normal people might be willing to sacrifice their world for their children because they would eventually die (either in the war or later) and their misery would end. But Jack Harkness would live on. He’d have to face this world, destroyed or otherwise, every fresh morning that he wakes up.

I think that’s why he decides to leave Earth and go on a galactic journey amongst the stars. He can’t live in a world that keeps changing where he doesn’t. He can’t live in a world that gives him the illusion of being permanent and then falls apart around him.

The Next Series?
Series produces Russel T. Davies has said that the fourth 2010 series is ready to do and telecast would depend on the response to ‘Children of Earth’. I do wonder how they’d do it with Jack Harkness now galavanting around the universe. But as we know with all Dr. Who spinoffs, it’s usually not very difficult. :)

Issues
‘Children of Earth’ raises, but just raises and doesn’t really discuss, another important issue. When humans are asked to gift the alien with 10% of their children what they decide to do is choose the bottom 10% in terms of academic performance. When this happens on screen, it really hits you like a hammer. Would there really come a time when your right to live will become linked to your academic prowess?

The second issue it raises is of the difference between the civil service and the politicians. Now, I confess here that I don’t know much about the political scene in Britain. But what I can understand despite that is that the show delineates an important difference between the civil servants and the politicians. Politicians are transient. They come and go. But civil servants have to stay, sometimes for several decades working in the same department. That permanence makes them a lot more responsible than the politicians. The democratic system, because of its transience takes away a lot of accountability from the shoulders of politicians who thrust it upon the shoulders of civil servants. This is an issue that any modern democracy should look into.

There is also the issue of the US meddling with the affairs of UK that seems to be a raw nerve within the latter nation. Torchwood, Dr. Who and other spin-offs bring it up often enough.

Saturday, July 11, 2009

The Annals of the Heechee


The Annals of the Heeche is the fourth book in Frederik Pohl’s Heechee Saga. It narrates the story of Robinette Broadhead, sometime prospector and current billionaire as he galavants around the galaxy trying to keep the Foe – enemies of this universe – at bay.

The first thing that this book reminded me was the Ender books by Orson Scott Card. The first reason is the significant role that machine intelligences play in both Heechee and Ender. Machine intelligences don’t come into play in the first Ender book, but from the second book on, Jane, a mysterious AI who becomes Ender’s companion for life. Similarly, Robinette Broadhead in Annals of the Heechee has several AI companions who are a significant part of his life.

The second way that it reminded me of the Ender books is the way it deals with the aliens – the other. Ender’s story begins with a complete othering of the aliens. They are mysterious, unknown and threatening. There seems to be no way at all of understanding or communicating with them. Indeed, human being must exterminate the aliens in order to even survive. And this remains so till almost the very end of the story when with a classic twist in the tale, the other becomes understandable, negotiable and even amiable. The same occurs with the Annals of the Heechee. In the beginning, the Foe remain mysterious and deadly but only at the very end is their secret revealed and they become understandable and even benevolent in some sense.

What struck me as amusing is that the characters in the Heechee saga seem to be the realization of common geek fantasies. A spouse who is an expert programmer AND breathtakingly beautiful, not to mention Russian with a cute way of speaking English? A best friend who is a cheeky computer program in the likeness of Albert Einstien? Mr. Pohl most definitely knows how to pull the strings of the geek heart. :)

Star Trek XI

I saw the film on the weekend it opened and didn’t quite know whether to like it or not. It was an awesome action movie but with Star Trek you always expect something beyond an action movie. And on the first watch, I didn’t seem to get anything of the beyond.

Then I came back home and read the official back story comic. That gave it some perspective. And I also had the time to mull over the movie itself. I had time to appreciate how cleverly the reboot had been done. How characters had been tweaked to have more depth without moving too far from the original. How the presence of old Spock guaranteed that continuity is maintained in a very strong way.

And then I went and watched the movie again. This time it seemed a lot better. But still not quite there, I’m afraid.

It was only after the discussions on environmental science fiction going on at the IITK SF Workshop mailing list that I realized that Star Trek XI could possibly be seen as having strong environmental undertones. That is, if you look at it in conjunction with the back story.

The central crisis in the movie is an environmental crisis. A star is going nova which is going to destroy an entire world. We have the technology to stop it. However, we’re not doing it because of familiar reasons – apathy, mistrust and politics.

What was most appealing about this reading was the character of Captain Nero. As has been said before, Captain Nero is a strangely troubled man. He is, in some sense, an icon of what will be left behind if indeed an environmental disaster occurs to earth. Captain Nero symbolizes loss and anger and helplessness and that’s what we will be left with if we don’t do something about it soon.

Tuesday, June 16, 2009

Mail Notifications and Notify-OSD

A lot of people use mail-notifications on Ubuntu to notify them of emails. However, actions are enabled by default in mail-notification. This means that everytime you get new mail, notify-osd causes mail-notification to open the notification in a window.


Clearly, this is not very convenient. What we would want (to ensure compatibility with notify-osd) is a discreet little notification in the top-right corner of your screen. This is easy to do.

1. Run gconf-editor
2. Navigate to apps -> mail-notification -> popups
3. Delete all values for the 'actions' key


You will now get the new style notifications.

Monday, June 01, 2009

June 01, 2009

It's funny how sometimes you have so much to blog about and sometimes you can't think of anything even after trying. This is one of the latter times. I'm trying to write something everyday to get the flow started. Isn't quite working, as you can see.

So what's on my mind right now? Have just finished reading my daily doze of blogs and news. These days I get most of my news from blogs. Which is sad because I only hear about flame-bait topics. I heard about the attacks on Indian students in Australia. Sad, sad incident. But clearly Australia has a long way to go with racism. Remember all those racist remarks their cricketers have been alleged to make?

The second thing on my mind is Google Wave. There has been mixed response to this new technology over the internet. It does look promising in ways. But my understanding is that it's just a platform. It won't pick up until people actually make useful products out of it. And talking of Google products, anyone know what happened to knol? Is anyone using it? Why doesn't it ever turn up in any searches?

I have loads of work to do and amn't doing any of it. And as usual, I've screwed up my sleep cycle over the weekend. :( Have to fix that.

Sunday, May 31, 2009

Soul Music


Just finished reading Soul Music. One of the better Discworld novels, I'd say. It deals with Rock Music and the meaning of life and death and is hilarious at places.

Tuesday, May 26, 2009

Making Symbolic Links on Windows

Symbolic links can be created in Windows Vista and Windows 7 using the mklink command. The mklink command is not available on earlier versions of Windows.

To make a symbolic link

mklink /d [link] [target]

/d tells the command that the link is to a directory. [link] is the name of the link and [target] is the target directory.

To execute mklink you'd have to run cmd.exe as administrator.

Cedar Point

Visited Cedar Point at Sandusky, Ohio. It is about a 2 1/2 hours ride from Columbus so we could comfortably stay literally all day at the park. We left at about 8 in the morning and reached there by 10:30. The park was open till 8:00 PM on the day we went and we stayed until closing down.

Now I haven't been to many amusement parks. I've only done Essel World at Mumbai, which no doubt, is a kiddie park compared to anything in the US. The first ride that we decided to do was something called the Raptor, a green and green monstrosity and we had no idea what it would be like. But roller coasters do not offer the fear of the unknown. We stood in line for about 3/4ths of an hour for this ride, hopped on, and got ridden. It was amazing. Breathtaking. By the time I got down my legs were shaking and the wind was out of me.

Now, the fear set it. One knew what one was in for.

We decided to do something simpler next. What we did was something called the Wicked Twisted which was a U-shaped ride which twisted towards the end. We did it. Wasn't all that tough.

Since we didn't want to walk too far after that, we did an indoor ride which really was too simple. I don't really rememeber the name of it, but it was space themed and used lots of neon and strobe lighting as you travelled through pitch dark tunnels.

I think the group had most fun with the water rides. Living in Ohio we don't get to see much water. :(

I think the best part that I liked were the two free fall rides -- Power Tower and Demon Drop. Somehow I like the idea of being in a free-fall, but only when I'm the right side up. Coasters put you upside down and I don't like that. These two rides made me genuinely happy.

I don't think I did any of the big rides. I didn't do Millenium Force. Neither did I do the Top Thrill Dragster. I didn't quite like the fact that the Dragster doesn't always function as intended. While were were there the car actually got stuck at the top. They had to ride up in an elevator and give it a push to bring it back. I hate the idea of being stuck up there for several minutes.

On the whole I find it quite fascinating that every year, millions of people come to amusement parks, pay a whole lot of money to get scared. Human behavious is really infathomable.

Sunday, May 24, 2009

Windows 7 - I'm Loving It


Never before has Windows impressed me so much. Good old XP was reliable but lacked the feature rich punch that Linux had. Vista took some steps in the right direction (I'm a big fan of Vista's file browser) but was slow and sluggish and not nifty enough. Windows 7 hits the right cord between features, ease of use and speed.

The Taskbar
The completely revampled taskbar is perhaps the most talked about feature of Windows 7. It is very much like the OSX dock but I do think it's better than docks. I find docks to be irritating. They move around a lot and in general cause too much distraction. Windows 7's new taskbar is cool. It is static, configurable and useful. I like the fact that you can see progress dialogs in the icon and that right click shows you recent items. I also like the fact that the system tray now does not expand hidden items but shows them in a popup window. Additionally, Windows 7 does not break backward compatibility. You can get your old taskbar back with just a few click (well, almost).

Searching
Indexing does not slow down your computer anymore. Moreover, searching is fast enough to be useful now. Search as you type actually searches as you type. Still not as fast as most linux apps would have it (I've never understood why this should be) but still very usable.

Theming
Windows 7 extends theming capabilities. Wallpaper slideshow is now built in. Additional sound themes are also provided.

Window Management
Window management has improved a lot. Everyone knows about the aero peak. What people don't know is that if you drag a window to the left screen edge, the window resizes to occupy the left half of the screen. If you hit the top edge, the window maximizes.

The best part is, the OS feels light as XP and adds loads of new features. In short, I'm loving it!

Monday, April 13, 2009

Ubuntu Notification Script for Amarok 1.4


More Update: A more polished script is now available here.

Update:
There are several updated versions of the script now available. Please see the comments for details. Also, the music applet on gnome provides similar functionality. On Ubuntu, do 'sudo apt-get install music-applet'. Then add the music applet to your gnome panel. Configure and enjoy! :) In case you don't want an extra applet on your panel, feel free to use the below given scripts.

Ubuntu Jaunty is going to come with a unified notification system. I use gnome these days, but can't live without amarok. However, it bugged me that amarok 1.4 does not comply with the Ubuntu notification system. So I wrote a small python script for it. This works only for amarok 1.4 and Ubuntu Jaunty. Screenshot attached.

How to Install
In amarok 1.4 click Tools -> Script Manager -> Install Scripts. Open file track_notify.amarokscript.tar. Run script once it's installed.

Sunday, April 05, 2009

What is the Grand Canyon Good for?

Some days ago, a friend of mine, posted this link. Apparently some folks over at NASA have calculated the square root of 2 to 10 million digits. My immediate reaction of seeing this was:

Things like this make me ask -- Why do it? Just so you can?

To this, another friend responded:

@Vinod: Sorry, just can't resist quoting this joke:

A math professor, a native Texan, was asked by one of his students: "What is mathematics good for?"
He replied: "This question makes me sick! If you show someone the Grand Canyon for the first time, and he asks you `What's it good for?' What would you do? Well, you kick that guy off the cliff!"

I still can't figure out what is the maths equivalent of kicking someone into the Grand Canyon, though ...

Frankly, I'm not satisfied with this response. Now, do not get me wrong. I do understand aesthetic beauty. I find encounters with naturescapes like the Grand Canyon to be very emotionally moving experiences. I also (sometimes) find encounters with scientific beauty to be emotionally moving. I myself have spend may idle hours trying to calculate prime numbers or the fibonacci series on my computer. And yet, I cannot help but wonder -- why calculate sqrt(2) to 10 million digits? Or, why visit the Grand Canyon?

The simplest answer is -- to feel the way it makes me feel. And I would have no problems with that answer either. However, it would make me wonder even further. Why do these things make me feel how I feel?

What really is special about the Grand Canyon? What do I mean when I say it is beautiful? I don't think a single answer exists but let me make a few guesses.

People find the Grand Canyon beautiful because it is big. Being big is one definition of being beautiful. The oceans are beautiful because they're big. The mountains are beautiful because they're big. Space is beautiful because it is bigger than anything we've ever known.

Being big is related to two inter-related concepts -- control and knowledge. If something is big, chances are that we have little control over it. Bridging the Grand Canyon? Perhaps impossible. Crossing the ocean? Rather difficult. Surviving in space? Requires billions of dollars.

If something is big, chances are that it contains something that we don't yet know about. Something that we can use to our advantage. Exploring the oceans let some people to discover other people and lands. We are yet speculating about the benefits that space exploration might bring us.

As a culture we've learned that anything that is big is most likely unexplored and uncontrolled. If we can learn more about it and learn to control it, we might end up with more resources to make our life better.

I think that is the charm big, unexplored terrains hold for us. I think that's why we find them fascinating and intriguing. That's what the Grand Canyon is good for.

Of course, this does not mean that every time I look at the Grand Canyon this is what I'm thinking about. I have internalized the concept to a degree that I can forget all about the benefits of encountering an unexplored terrain and concentrate just on the 'beauty' of it. Which is absolutely fine with me. But I do like to think further and find out what that beauty means.

Which is why I do not like it when specialists in pure sciences brush off questions like -- why do you do it? I think it is important to understand why we do pure science and pursue knowledge for knowledge's sake and derive pleasure in certain things. All sorts of beauty and aesthetic appreciation has underlying meaning which I think is important to unearth.

Sunday, March 29, 2009

Science Fiction Writing Workshop At IIT Kanpur

(JUNE 15 – JULY 3, 2009)

Download announcement.
Download application form.

CALL FOR APPLICATIONS

We invite applications from interested people, both students and non-students, who would like to participate in a 3-week Science Fiction (SF) writing workshop at IIT Kanpur. The workshop offers an intense, immersive, content-rich experience that is a good first-step in training the next generation of Indian SF writers.

Goal & Plan: The workshop will help new Indian authors develop their skills and encourage SF with a south-Asian focus. Specifically, the students will read and critique some of the best SF writing in the field, both classic and modern. Second, the daily writing exercises and group-critiques of the weekly story submissions will reveal individual strengths and weaknesses. Finally, we will attempt to show how the subcontinent offers unparalleled story-telling possibilities, especially for SF.

Instructors: The workshop will be conducted primarily by two US-based Indian SF writers – Anil Menon and Vandana Singh, and one IIT Kanpur-based literary scholar in the field of SF – Suchitra Mathur. (short bios of the three instructors are included below for your information). In addition, there will be guest lectures by other Indian SF writers as well as some IIT Kanpur faculty who will share with us the brave new worlds opened up by cutting-edge innovations in science and their relationship with the world we live in.

Application Process: This pioneering 3-week Science Fiction writing workshop is being offered at the cost of Rs. 3000 (Three Thousand Rupees) per head, which includes boarding and lodging for 3 weeks in IIT Kanpur, as well as the costs of all instructional hand-outs given to you during the workshop.

To apply for this workshop, please send us the following documents latest by April 30, 2009:

1) A sample of your creative writing, NOT exceeding 5000 words (this does not necessarily have to be in the genre of Science Fiction, though that would be preferable)
2) A filled out copy of the enclosed application form

The documents may be sent to us electronically via email to: suchitra.mathur@gmail.com or anilm@acm.org

Or you can mail hard copies to: Suchitra Mathur
Department of Humanities and Social Sciences
IIT Kanpur
Kanpur – 208016
Phone no.: 0512-259-7836/8234

Applications received after April 30, 2009 will NOT be considered. You will be informed by May 15, 2009 about your selection for this workshop. To confirm your attendance of this workshop, you will need to send us a demand draft for Rs. 3000 at the above address within a week of receiving our acceptance notification (latest by May 22, 2009).

Soft copies of the Application Form for this 3-week SF writing workshop may also be downloaded from anilmenon.com.




The Instructors

Anil Menon worked for about nine years in software R&D in the US, worrying about things like secure distributed databases and evolutionary computation. Then he shifted to a different kind of fiction. In his stories, he has been a kid who finds everything funny ("Standard Deviation"), an island chain ("Archipelago"), and discovered new physics ("A Sky Full Of Constants"). His stories have been published in magazines such as InterZone, New Genre, Strange Horizons, etc. “Standard Deviation" won an Honorable Mention in the Year's Best Fantasy and Horror (2005) and "Archipelago" was nominated for the 2006 Carl Brandon Society's Parallax Prize. His novel The Beast With Nine Billion Feet (Zubaan) is scheduled to appear in 2009.

As a kid, a chance encounter with Ray Bradbury's "A Sound of Thunder" led Anil to other great stories in Science Fiction. However, it soon became clear that western SF was based on an unwritten assumption, namely, that all the really cool adventures-- inventing crazy devices, meeting aliens, time-traveling, saving the world from comets, etc. -- were mostly reserved for Caucasians. The future is assumed not to be of ‘our’ making. This workshop will challenge this assumption by training a new generation of Indian writers to rethink and re-imagine speculative fiction.

Vandana Singh is an Indian writer living in the U.S., where she also teaches physics at a small college. Some of her science fiction and fantasy stories have been shortlisted for awards and have appeared in Year's Best anthologies. A number of them are collected in her recent book, The Woman Who Thought She Was a Planet and Other Stories, which came out from Zubaan and Penguin India in 2008. She is also the author of the Younguncle series of children's books. Her most recent publications include two novellas, Of Love and Other Monsters and Distances, both from Aqueduct Press, Seattle. While both are journeys of self-discovery for the protagonists, the first is set on Earth and explores the life of a young man who has lost all memory of his past and is on the run from a shadowy figure most like himself. Distances, on the other hand, is set on a far-future planet in another part of the galaxy, and is a story of science, mathematics, art and deception. Vandana enjoys reading and writing fiction that pays attention to language and character as much as to ideas. Her stories attempt to examine the human condition against the backdrop of an infinitely engaging, mysterious and sometimes terrifying physical universe.

Suchitra Mathur comes to SF as a reader and literary critic. Trained in the respectable ‘English Literature’ canon throughout her formal student career, she wasted no time in shrugging of this hoary mantle as soon as she gained the power that comes from occupying the other side of the classroom. As a teacher of literature at IIT Kanpur for the past ten years, she has joyfully plunged into the world of SF, attempting to understand her students’, and the modern world’s, obsession with Science through an exploration of the marvelous speculative worlds created in fiction and film. SF, of course, is not new to her; she grew up as an ardent Star Trek fan, with a healthy diet of Asimov and Clarke to sustain her verbal cravings. These early encounters have now transformed into active voyages to discover strange new possibilities of science, what it means, and how it relates to the worlds we inhabit and envision. She has shared her discoveries with others through courses taught to IITK students on Science Fiction, and articles published on Indian science fiction.

The Power of Facebook

To all those who crib about Facebook and how it is leading to interaction that is largely meaningless, hear this. Three of my friends, who in an internet-less world would have never ever talked to each other, are having a very lively discussion on a post that I made on Facebook. I find it absolutely amazing.

So be reminded -- technology is a just a tool. If you use it in a meaningless fashion, it remains meaninless. But if you use it properly, it helps us boldly go where no one has gone before!

Friday, March 27, 2009

Borrowing Vocabulary?

During the whole reservation debate a little while ago, we found the entire nation suddenly using the words 'affirmative action' -- words which, at least to my knowledge, are not the official words that the Indian government uses.

And today, I came across this blog post which calls the constituent assembly as the 'founding fathers'.

Frankly, I find this borrowing of vocabulary from the US, somewhat disturbing.

Update - April 2, 2009: Shanth points out similar trends in fashion.

Sunday, March 15, 2009

The Rage in Placid Lake

The Rage in Placid Lake is a delightful comedy. It inverts a lots of mores of traditional comedy and thus manages to stand apart.

Placid Lake has been brought up by hippy, non-conformist parents. On his first day of school he’s sent wearing a girl’s dress so that he can “challenge the internalized notions of sexuality” in his classmates. Needless to say, it doesn’t bode too well for him. But he turns out all right.

He is taught to see the positive side in all things. So as a high-schooler he manages to do the hottest girl in the class by confounding her with feminist jargon and making her feel good about her inadequate self. And despite getting regular beatings from the class bullies, he never lets them feel that they’ve gotten better of him.

But things take a one-eighty-degrees turn when, in an attempt to escape a beating from these bullies, he jumps off the roof and breaks every single bone in his body. He undergoes a long period of introspection during his time in the hospital and decides that he would live a “normal” life from now on.

He gets out, gets a job with an insurance company and starts to doing his office colleague. And for the first time in his life, completely freaks his parents out. He also freaks out his high-school friend, Gemma. In a series comic adventures, Placid realizes that conformism isn’t really for him, but neither is the textbook non-conformism which only becomes conformism of a different kind.

Saturday, March 14, 2009

The Lost Coast

When you are young, every day is a new day. You haven’t seen most things in life and thus, no matter what you see, you see it new. But then you grow up someday. Life becomes routine and mundane and the bestest novelty you can encounter is merely an improvisation on an already existing theme.

And occasionally, you chance upon something that is truly and genuinely new. Something that you’d never heard, never thought, never even dreamed about.

The Lost Coast was one such movie for me.

The two main characters of the movie – Jasper and Mark – are high school buddies. Mark is straight, Jasper is gay. When they were in high school, they went to the Lost Coast on a camping trip. On that trip, they had a sexual stint. In the present time, they’re celebrating Halloween with two more of their friends. As they roam through the night is search of a good party and ecstasy, Mark and Jasper have to deal with their feelings and sexualities once more.

The movie made me think of something that I’d never thought of before. If two straight men are friends, they’re friends. If two gay men are friends, they might have a romantic relationship. But if one straight man and one gay man are friends, what do they do? What do they do when one of them wants a romantic relationship and the other one cares about his feelings but can’t really give it to him.

The movie is suffused with the sense of loss. Jasper, who is straight, has lost a friend. Mark, who is gay, has lost a lover. No matter how hard they try, they are not able to reconcile their lost.

Something must also be said about the cinematography of the movie. It is just beautiful. You have long, silent shots in overcast lighting. You are allowed to hear the natural sounds of the sea, the wind and the grass and woods. You are allowed to feel all alone out there, with nothing but yourself and your feelings to keep company. And in the end, you feel the loss for both Jasper and Mark.

Do watch the trailer on the movie website.

Friday, March 13, 2009

My Problem with Swades

Let us, for now, forget Delhi 6 and talk only about Swades. The NRI, Mohan Bhargav, comes to India. At first, he is more or less in the tourist mode, living in a trailer, drinking bottled water, avoiding eating local things. He gets to know the people in the village. Gets to know their problems. Decides that he has to solve them. He decides to build a power plant. He buys all the equipment for making the power plant out of his own pocket. He does not have the support of most people in the village and does it with only a few people on his side.

Compare this with the actual Bilgaon Hydel Power project on which the film is based. The project was initiated by the people of the village themselves. Some of them were members of the Narmada Bachao Andolan and sought their help carrying it out. A village committee was formed, a resolution was passed in the relevant gram panchayat. The system was designed by young engineers from the National School of Energy. More than 2000 man days of shramdan was given by the villagers themselves. AID gave about 12 lacks rupees towards the funding of the project. While the project was operational the villagers paid for their own electricity. There were other agencies involved but in short it was a HUGE collaborative effort.

Mohan Bhargav’s solution is a top down solution. He sat down and decided what to do for the people. The Bilgaon Project is a bottom up solution. The people decided they had to help themselves and sought help from relevant agencies. Mohan Bhargav’s solution is not sustainable. If he leaves, who is going to keep the project running? How is he going to keep it running despite opposition from much of the village? Fortunately he has the changes of heart towards the climax to help him out. Bilgaon Project was self sustaining. The villagers pay for the operation of the plant. They help operate it.

Mohan Bhargav’s aim is not wrong. The way he goes about achieving the aim – single handedly, without public participation, in a top down manner – is wrong.

Swades assumes that a) People are not willing to help themselves and, b) Help should be forced upon them because that’s what’s good for them.

This holier than thou attitude is my problem with Swades.

Getting back to Delhi 6, I’m not saying that it gets it right either. But just the fact that it is Gobar who comes up with the solution to the problem rather than Roshan, makes it a little bit more likable to me.

Related:

Thursday, March 12, 2009

Delhi 6

Just watched Delhi 6. Actually liked the movie. It’s a regular Bollywood fare, so I’m not going to rave about it in any way. But yes, it was watchable, good even.

What I liked about the movie was that it uses a different technique to tell the same old story. Communal harmony is a story that has been told in Indian so many times and in so many ways. Mehra also tells the same story but uses a different technique – that of allegory and metaphor. I’m sure that’s why a lot of people didn’t like it. People like their stories to be flat and straightforward.

I like the way Mehra treats the character of Roshan. There is comparatively lesser sense of eroticisation in the movie compared to, say, Swades. There is a sense of acceptance. “Achhai hai, to hamari hai, burai hai to bhi hamari hai.” This is who we are and Mehra is unapologetic about it.

Gowarikar’s NRI (in Swades) fixes India’s problems and becomes Indian in the process. Mehra’s NRI becomes Indian and then fixes Indias problems. This is the part that I liked best.

I still don’t get why characters in Indian movies are so flat. And I’ve been noticing that it is the lead character that’s mostly flat. The rest of them seem to be okay. Let’s take the characters from this movie. Roshan’s uncles are both have their peculiarities. One (Om Puri) is authoritarian. The other one is doing well in business, considers himself a smart aleck and likes to show off. Bittu is a typical chandni chowk girl who transforms into a typical college girl as soon as she steps out of chandini chowk. She wants to be in Indian idol and has a secret thing going with the gali’s photographer. Mamdoo takes pride in his jalebis, gobar is the fool.

In short, all of these characters have something that defines them. They have characteristics, goals, aspirations. They have a life. But look at Roshan. What does he do? Is he a student? Does he work? What does he want to do in life? Any typical habit? Anything that he loves to eat? A quirk perhaps? No nothing. Roshan has no characteristics, no goals, no aspirations. He doesn’t have a life.

Why are lead characters in Indian movies so shallow and flat?

Rahman's Road to Oscar

An amazing article from the Rolling Stone.

Friday, March 06, 2009

American Humor

While I do not like to stereotype things, I’m forced to admit that I like British humor better than American humor. I like Douglas Adams, Terry Pratchett, Monty Python, Coupling and Doctor Who. On the other hand, I can’t name anything off the top of my head that’s American and funny. This has troubled me for a few years now and I have kept thinking about why that is. Now that I’m in the US and am watching a lot more American TV than is good for my health, I might venture to make a few guesses.

I think there are three broad things that are funny to American writers:

1. Insults: if you insult someone, it’s somehow funny. Things I can think of – Southpark, Family Guy, The Daily Show and Russell Peters. Lots of scenes there of insulting people which are supposed to be funny. I don’t know if people actually laugh at them. At least I don’t.

2. Irritation: if you do something irritating it’s funny. Make silly faces, imitate irritating people, scratch your nails on the black board. Things I can think of – Saturday Night Live. They do a lot of sketches in which irritating things or people are depicted. Family Guy – some scenes in which the same irritating thing is repeated over and over again.

3. Dirtiness: if you mention anything related to farting or pooping, it again, is somehow funny. Add ejaculation and sexual fluids to that too. Yuck.

Fahrenheit 451 by Ray Bradbury

Fahrenheit 451 is a near future dystopian novel by Ray Bradbury. It narrates the tale of Guy Montag, a fireman, whose job in a totalitarian state is not to put out fire but to burn books.

Honestly, I couldn’t get to the end of the book. It was a very tedious and boring read and I finally decided that I was better off reading something else. I picked up the book only because it is so critically acclaimed. I could see why it is critically acclaimed and yet the book failed to appeal to me. Not my type of literature, I guess.

The basic problem I had with the novel was style. It is self indulgent. The author is writing long explanatory paragraphs and long winded poetic imagery which slows down the pace of story telling. What happened to show and tell? Do you absolutely have to lay down every objection and argument you have against censorship in such neat and precise manner. A little thing will happen, then a cryptic abstract paragraph will follow, followed by a long explanatory one.

Second, the book is largely an angry rant about censorship. Censorship is bad and we should burn anyone who is doing it. There is very little analysis of why censorship happens and what the reasonable ways to prevent it can be.

Wednesday, March 04, 2009

Song and Dance Sequences in Bollywood Movies

The recent success of Slumdog Millionaire has introduced, albeit in a roundabout, convoluted way, western audience to Bollywood movies. Or rather, the Bollywood movie style. One thing that fascinates them most are the song and dance sequences. I have been asked, more than once, what the deal with them is? Why are 'Indians' fond of song and dance sequences?

The only think I can say is that song and dance sequences are part of the Bollywood movie format. Why does opera have singers driving their voices to inhuman pitches? Why do broadway musicals have, well, music in them? Why do pop songs have a scale change towards the end of the song? That's just the format that these artforms have. And this format has most likely evolved though the complex process that defines convention.

So in a similar manner, song and dance is just a format that Bollywood movies use. Sometimes it's used powerfully, sometimes it's just silly. But it's there, it's just a format. We make movies in the more 'realistic' Hollywood format too. Just that they are far more uncommon.

Monday, March 02, 2009

Usability Lessons Linux DE's Can Learn from Windows

I use both Windows and Gnome and KDE on Linux. Here are three usability lessons Linux DE's can learn from Windows. All three lesson's have to do with animations/effects in GUIs.

1. Make the taskbar opaque with maximized windows: I love transparencies. I really do. When we were still playing around with XP, I installed WindowBlinds and got a transparent panel for myself. You can see the wallpaper behind the windows and also through the transparent panel and it highlights the illusion of the windows being 'above' the wallpaper. It looks nice.

However, when you maximize windows, the wallpaper disappears, except for the transparent bit behind the panel. The illusion is lost and the transparency just looks inconsistent. I think that's why Vista makes the title bar and panel opaque when one or more windows and maximized.

2. Show minimize animations behind the next focussed window: When you minimize windown kwin4 or compiz, the minimize animation is shown above the window that gains focus next. Now, the user has minimized a window most likely to gain access to another window. It is not a good idea to make the user wait for the minimize animation to play out before he gets to see the window behind it.

Vista does it in a clever way. It shows the minimize animation behind the window that gets focus next. It's clever and more usable.

3. Blur behind transparency: Transparency is good but makes identifiying the foreground object difficult. An easy way out of it is to blur the backgrounds. Most notably, it makes the text easier to read on the foreground. I know that compiz, kwin4 etc support blurring, but it's not turned on by default. It should be.

RGV on ARR

RGV speaks about ARR.

One other trait I noticed about the difference between A.R and other music directors is that where the others pretty much dictate to the musicians and the singers about what they want, A.R interacts with them; in a manner of making each and every one of his solo musicians and singers feel as if it is their song and not his, thereby placing the onus on them to feel from within to get the best out of them. This I have never ever seen remotely practiced by any other music director.

Wednesday, February 25, 2009

Prime Factors of 8051

Find the prime factors of 8051 withouts using any computing devices. Do not even use paper and pen. It's pretty simple, actually, once you see it. :) Put the answer in the comments.

Sunday, February 22, 2009

The Accidental Time Machine by Joe Haldeman

The Accidental Time Machine by Joe Haldeman is a delightful story. After a long, long did something force me to pull and all nighter. I started reading the book at about 11 in the evening because I usually read myself to sleep and it gripped me so that I could not go to sleep. Kept reading till 6 in the morning.

The story in the same spirit as H G Well's time machine. An unsuspecting MIT grad student accidentally invents a time machine. After losing his job /and/ his girlfriend to the same guy, he decides to travel in time in a desperate lunge for fame. But he finds that no matter what future he travels to, he can never find one that he can feel at home in.

In the spirit of Well's 'Time Machine', Haldeman describes a dichotomous future but this time pertaining largely to America, unlike the broader human divisions that Wells decided to explore. In Haldeman's future, America is divided into two states. One, a regressive, theocratic Christian state, where the government creates the myth of the return of Christ and rules people through the fear of god. Second, is a secular, technologically advanced state which is profoundly anti-intellectual and deeply capitalist-consumerist.

In outlining these two possible futures for America, Haldeman delineates the two threats to intellectual thought present in the US today. The first are the religious conservatives and the second are the capitalist-consumerists.

I do have to add that I found the novel a little isolationist in its point of view. No effort is spent in writing about what the rest of the world is doing while the One Year War is going on the US. Indeed, it is as if the rest of the world doesn't even exist in Haldeman's universe. Only towards the end of the story do we see Australia cropping up from somewhere, which, I think, is put there merely for it's geographical separation from the rest of the world than anything else.

Rating: 3.5/5

A R Rahman Wins the Oscar

A R Rahman has just won two Oscar Awards – one for Best Original Score and another for Best Original Song, for Jai Ho.

I must say I'm a little overwhelmed with emotion. I have been an ardent fan of his music since many years. I can be said that I seldom listen to any music that is not his. Once you get addicted to his work, other stuff appears,w ell, a little bland to begin with.

The man is a genius, in the true sense of the word.

In this one instance, I can safely say that it's the Academy Awards which have been honored today.

Thursday, February 19, 2009

Best Spam Ever

Got this in my inbox just a few minute ago.

Dear Sir,

We AFRICA PRECIOUS COMMODITIES COMPANY LTD are ready and able to supply you with Alluvial gold of very fine purity, we require end Buyer’s or representative’s presence for a preliminary assay at the geological survey department fully controlled by the local government of Sierra Leone before any shipment could be effectuated.

The contractual quantity for sale to the Buyer Under the terms of this Agreement shall be a purchase of gold dust and bars of 250kg with rolls & extensions up to 500kg.The total price payable by the Buyer is fixed at (16.000.00$ per kilo of gold dust and 18 000 for gold bars). If you are interested, kindly contact us back for more
details.

Best Regards
Chief Abdul kanu

Wednesday, February 11, 2009

Why I Went Back to Gnome

aka Why I Think Linus Trovalds Did

We heard a few days ago that Linus Trovalds has stopped using KDE. Well, so have I, same pinch. But over the past few weeks I’ve been wondering what really is wrong with KDE4.

And why would we wonder what’s wrong with KDE4. That’s because KDE4.2 is here. It is stable, it is functional, it has features and yet it is unusable. Why should a stable, functional, featureful piece of software be utterly unusable? Lets could the reasons.

(Disclaimer: the problems that I recount here might not have to do with KDE. They might be the problems with the kernel, Qt, Kubuntu or just me. But Joe User doesn’t care about that. Joe User wants his software to do what he wants it to do. If it does not he whines. So you either fix his problem or you educate him. And if you educate him he doesn’t remain Joe User after that.)

Plasma
I love plasma. It is immensely powerful and has infinite potential. To realize just how powerful plasma is, do this in 4.2. Click on the clock to open the calendar. Now drag the calendar onto the desktop. No other desktop environment can ever let you do that. It’s awesome!

However, also do this. Drag the weather plasmoid onto the panel. Or try dragging the analog clock onto the panel. Try to put your panel on the side rather than the bottom. The results are awful. Plasma is wonderful and all that, but things aren’t working. It is not that they can’t work. It is just that the developers haven’t yet figured out the best way to make them work.

Take activities for example. I like the concept. I have a use case for them. When I’m working on my computer I like to have the notes and calendar widget on my desktop. When I’m reading and listening to music I like to have the now playing widget on my desktop. But everytime I want to switch an activity, I have to zoom out using the cashew and then zoom in.

You know what, in one context I like the windows panel better than the KDE panel. It is that the Windows panel has ‘levels’. For example if I have my panel made larger so that it is three times as high as the regular panel, I can have the taskbar on the top level, iTunes toolbar at the second and quicklaunch at the third. It is a highly efficient way to use your panel space.

With KDE you can only stack your things horizontally and not vertically. That renders the panel a little less usable. And yes, this was a problem with KDE3 too and they’ve not fixed it in KDE4.

The systemtray! Will someone finally fix it please?! Why does it have to flicker every time I minimize a window? Why do the icons take forever to load? I thought the systemtray would be first thing that people would fix!

KWin
I really like the idea of animations being coded into the window manager. I really do. It removes one level of complexity from the desktop environment and makes life easier for the developers.

However, the animations in kwin just aren’t right. In windows or even with compiz, when you restore a window, it first grows slowly and then faster and faster until the window appears to ‘pop up’ on your screen. KWin animations are linear and don’t have that ‘zing’ to them. Second, they aren’t smooth enough. They stutter. I can visibly make out the maximizing window stop in mid motion and then continue growing after a while. It is highly irritating. So much so that I actually turned the effect off.

KWin people, take a look at compiz. Run the same effects side by side on two machines, one with compiz and other with kwin. And learn.


Those are my reasons for staying away from KDE4. They are small reasons but when you used computers for 10 hours every day for your work, they tend to get onto your nerves. (Just like the Vista permission dialogs. Small detail but over time just irritates the hell out of you.)
What KDE4 lacks is not stability, functionality or features. It is that elusive quality called maturity.

(To dole out some praise, I think KDE4 has some absolutely kickass apps. Dolphin, Gwenview, and Okular are just awesome. I use them even with gnome!)

Why I Suck at Playing Video Games

I have never been good at playing video games. It is not that I lack eye-hand coordination. I’m good at other tasks that require this skill. And yet I suck at playing video games.

My gaming history goes back some years. It goes back to when I was a kid. My first experience with video games was in Chhatarpur, where my nani lived. We (my brother and I) used to visit, along with our mother for about a month or so in the summers. There was nothing exciting about the trip. I mean, it was good to see nani and nanji and mama and mami but then there were no kids to play around with (not until our cousins came along) and nothing to do, except eat and sleep. As an 8 or 10 year old kid, life was highly frustrating.

This is when I discovered that you could play video games for a price of 2 or 3 rupees an hour. It wasn’t exactly at a game parlour. It a small town kirana shop – the kind that keep everyday groceries, candy and other knick-knacks. At the back of the shop, the kirana-wala had installed some cheap TVs and gaming machines. The games available were the old classics – Contra, Mario, Road Fighter, Bomber Man. The gaming machines were the old 8-bit ones (from Sega or Nintendo, I don’t remember) that came with joysticks which had arrow keys on one end and four buttons at the other.

My mother had absolutely no idea what video gaming was about. For the longest time she thought that it was gambling of some sort. Her only experience with shiny, flickering displays had probably been with casino scenes in movies. Needless to say, she was completely scandalized when one day I shyly suggested that I be allowed to go and play for a while.

The other issue was money. For my mother, spending money on playing games, video or not, was completely unthinkable. So for the longest time all I got to do was stand at the kirana-wala’s and watch other kids play.

The first I got to play was when one of my uncles took me along when he himself went to play. He was only one and a half year older than me, (you know how it gets in extended families), and quite keen on spoiling this young man under his wing. We played some game that involved boxing the hell out of street thugs. It was great fun. I don’t even remember what that game was called and never ever found it again anywhere even though I looked and looked. And the best part was, we played on a colour TV.

It was not as if colour TVs were anything exclusive by that time. We’d had one at our home for many years by that time. But black and white TVs were still cheaper. So the kirana-wala would have a number of black and white TVs and have only a few colour TVs. And then he’d charge more for playing on the colour TV. If the black and white TV charge was 3 rupees, say, then the colour TV charge was 5 rupees.

But the real gaming experience came along when my nanaji was posted in Panna and we spent one summer with him in Panna.

Now Panna is a weird town. It is a mining town. (They have diamond mines there.) And needless to say, people are abjectly poor. The town has (or had) an uncharacteristically large number of tea shops which sold an uncharacteristically large number of rusks along with the tea. It seemed as though all the city ever had was tea and rusks.

Panna also seemed to have an uncharacteristically large number of mentally disturbed people. Nanaji always used to say it’s the diamonds. He said that being the most powerful ‘ratn’ the diamond was apt to drive people crazy.

We had this old man who used to come every day to the well right across the street. Our house was on the second floor and we could watch him from the building. He used to arrive at about 7 in the morning and bathe at the well till 3 in the afternoon. Yes, bathe. He lived nearby and brought all the big utensils in his house to the well one by one. Then he used to wash each of these meticulously. At times we’d watched him wash one utensil as many as five times over. Then he used to take his bath, again washing himself many times over. He used to do this till late afternoon. And along with this he used to shout things out. We never understood what they were.

Yes, if there was nothing to do in Chhatarpur, Panna was a recreational vacuum. I was so bored with my life that summer that I actually began reading this Hindi novel that nanaji had on table. (Much to his alarm. The novel was way beyond the understanding of a kid my age.) It was something called ‘Hansali Baank ki Lok’katha’. It was one of those regional novels whose sole purpose is to bore the reader with every excruciating detail from the lives of people from some remote village in India no one knows about.

So, seeing that I was getting bored out of my wits, my mother finally relented and let me go play the video games. The fact that the charges in Panna were a full rupee cheaper (per hour) than Chhatarpur might also have something to do with it.

Obviously, I played on the black and white TVs because it cost less. That was when I discovered Mario. The shop used to be hot (and you have to live in Bundelkhand to realize what heat means) and cramped. Sometimes we kids were sitting with not more than a foots distance between the TV and our heads. Every time a kid had to move, all of us had to pause our games, get up and make way. These used to pauses with much restrained anger. It took a whole minute or two off your playing time, after all.

I thought I was better at Mario than I was at Contra but I never made it beyond the fourth level.

In the subsequent years video games became more commonplace and people even bought them for home. Playing them was no more a taboo for my mother. Money was still an issue but then nothing beats the persistence of bored kids on hot summer evening. My brother had grown up a bit and I had to take him along every time I went playing. Obviously he wanted to play. But usually I didn’t let him and he had to stay content just to watch. Sometimes I used to let him play for a while. (Looking back, I feel so guilty about it.)

But gradually I lost interest in video games. Truth of the matter was, I completely and utterly sucked at it. Very soon, my brother who was barely half as tall as me could outdo me at any game. There’s no point in playing a game you can’t win.

Enter computer games. The first time I played a game, it was one a 12 inch monochrome display. It was a game called dave. There was this little man who had to jump over obstacles and shoot pretty little monsters with his gun to clear levels. I played it at a friend’s dad’s office.
We learnt computers at school. I also did some classes outside of school. At both places the teacher would sometimes let us play. There was the classic pacman and various spurious versions of Mario. There were sky, dave and yes, the legendary wolfenstien 3D. Wolf 3D made me realize how much I really sucked at playing games. Not only could I not make any sense of the 3D world, I could never remember my way around the map. (Even today I can’t find my way around a map in an FPS. Has something to do with my ability of not being able to navigate properly even in the real world.)

I never owned a computer until I was 20 years old and was in college. So these experiences with computer gaming were limited.

I did however code a pacman clone in qbasic when I was 16 year old. Yes, I am good at programming.

The only game that I’m moderately good at today is Age of Empires. I daresay I was an okay player in my wing at IITK. Other than that, I’m a complete and utter dolt at playing video games. I don’t know why. Perhaps the answer lies somewhere in this post. But I don’t know what it is.

Sunday, February 08, 2009

25 Random Things

I generally don’t do tags. But I’ve not blogged in quite some time so what the hell. Twenty five is a big number. Let me see how much time it takes me to do this.
  1. I have gray hair.
  2. Reading books is a way of life for me.
  3. I’m a big fan of A R Rahman and Star Trek.
  4. I’m a complete linux junkie. I spend an inordinate amount of time playing around with linux, reading news and articles about FOSS.
  5. I spend a lot of time online. Lord Google know me. Search for my name in google and you’ll know what I mean.
  6. I like trying out different kinds of food. I have always been a food theorist – always knew how a certain kind of food was cooked. That’s why I never faced much problem in learning how to cook. I daresay I enjoy cooking.
  7. Science Fiction and Fantasy is the biggest passion.
  8. Writing code gives me near visceral pleasure.
  9. When I was in school, I invented a script of my own.
  10. I had read the Feynman Lectures in physics in high school.
  11. I fell in love for the first time at the age of 16.
  12. Some of the most powerful emotional experiences I’ve had have been at Khajuraho and Konark temples.
  13. The Lord of the Rings and American Gods are the only two books I’ve read more than once.
  14. I obsessively maintain a collection of Bollywood actress wallpapers.
  15. I obsessively type capitals and punctuations everywhere – chat, email, blog, TODO lists. Everywhere.
  16. That’s because I’m a touch typist.
  17. I enjoy typing. There have been times when I’ve just typed random things to feel the keys under my fingers.
  18. I enjoy writing on paper. There have been times when I’ve just written down random things to feel the pen move against paper.
  19. But I enjoy writing on paper only with a fountain pen.
  20. I love reading horoscopes.
  21. If you take me to an ice cream shop, I’m very likely to have a flavour that I’ve never had.
  22. I enjoy walking.
  23. I’m easily intimidated by people, both men and women.
  24. I tend to get uncharacteristically rude and downright insulting while having ideological discussions.
  25. I hate poetry. Detest it in all its form. I think a world without poems will be a much better place to live in. Ironically, almost all of my close friends are good poets.

Saturday, January 10, 2009

You're going to laugh ...

... when you discover the answer to this one.

Complete the following sequence.

8809 = 6
7111 = 0
2172 = 0
6666 = 4
1111 = 0
3213 = 0
7662 = 2
9312 = 1
0000 = 4
2222 = 0
3333 = 0
5555 = 0
8193 = 3
8096 = 5
7777 = 0
9999 = 4
7756 = 1
6855 = 3
9881 = 5
5531 = 0

2581 = ?


It is said that children who have not attended elementary school are better at solving this problem than PhD's in computer science and mathematics. :)


Source.