Saturday, October 24, 2009

Google wave is a failure

Google wave has created a lot of frenzy lately. It has people begging for accounts and people who have invites selling them at e-bay. Deja-Vu! Gmail reloaded? Remember when everybody went crazy for the invitations and a lot of them were sold on ebay at that time. Google kept the supply scarce to drive this even more, tapping on a very basic instinct of human nature: elitism. "Oh_my_god_you_have_gmail" was like Harry potter's forehead scar and people loved to flaunt it. Google wave's launch have been similar. But there is a difference between Gmail and Wave.

Gmail was/is an awesome product and path breaking in many ways. Google provided 1GB storage when yahoo gave 4MB! Not only that, compared to Yahoo's interface Gmail was light-years ahead. It did what every great design does i.e. get out of the way and let them do what they want to. Gmail had features which people needed and they used the right technology to deliver it. It was first free ajaxified email client(a major one at least) and allowed people to do everything without reloading the page.

Wave, on the other hand, is almost obnoxious. It is as if Google is trying very hard to show off what it can do instead of delivering what people need/want. For instance, that live typing thing. I hate that feature. It is like the unix "talk" on console back in college and I hated it back then too. I do not want people to see what I am typing. I write angry things sometimes which I never send and therefore I do not want people to read what I type. I have talked to people about it and everybody feels that real time typing is just overkill. If you think about it e-mails allow people to speak freely without the fear of others stepping on your feet. It also allows you to think about what you want to convey, double/triple check what you are sending, check facts etc. Google wave just kills all this in one go!

I am sure Google engineers/product managers know that but they are too obsessed with the technology to kill this feature. Or may be they do not realize it. That is a bigger problem which means they do not understand the domain problem well and do not know what problem they intend to solve.

Even if Google gives and option to switch it off, I do not think Wave is going anywhere in this avatar. Wave UI sucks: It is unintuitive, slow and generally not well thought out. So even if they give an option to switch off the instant typing thing, this is not so easy to fix. For instance, if there is a long wave and there are to new waves at different ends of the conversation, I do not know how to find them. The enter key doesn't work as expected. There are so many "unsynced waves" notification. I can go on and on and on.

Monday, October 12, 2009

Proactive India

I love the fact that this Government is very proactive:

Going after the naxals proactively
Naxals have been a big menace for this country. They started off as a movement to protect the interest of Poorest of poor. However it has mutated into a cult which promotes crime and law and order which in turns makes sure poores-of-poor remain just that. It was abut time that govt. capture/shoot all the big naxal ideologists and they did just that when they captured Kobard Ghandhy. And now comes the pounding of the naxal land. Hope this seals the fate of Naxals.

Dealing with Pakistan in a firm manner
Pakis have been very adventurous last year with Mumbai attack. India responded really well by making them pay at various fronts like diplomacy and threatening stability of Pakistan. India also managed to launch the long needed eye-in-the-sky. They were all set to launch this Israeli "eye" in 2006 when America intervened. This is a crucial realtime element which has been missing since the days of Operation Blue star.

Dealing with China
China has been feeling adventurous lately and that is not good for us. India has shown China that it is not the 1962 India and will not take things lying down. They are activating advance airstrips, deploying Mig 29s, Brahmos missiles, building more roads and infrastructure to make sure China understands clearly.

Keep up the good work

Sunday, October 11, 2009

One line window pagination in Ruby

def getPages(current_page, minimum=1, maximum=20, window=2)
return((minimum+window<current_page ? minimum.upto(window).collect : minimum.upto(current_page+window).collect) + (current_page-window > minimum+window ? [".."] : []) + (current_page>minimum+window ? (current_page-window > minimum+window ? current_page-window : minimum+window).upto(current_page+window > maximum ? maximum : current_page+window).collect : [])+(current_page+window+1<maximum-window ? [".."] : [])+(current_page<maximum-2*window ? maximum-window : current_page+window+1).upto(maximum).collect)
end
Output:
>> 1.upto(20){|x| print x; print " : "; p getPages(x,1,20,1)}

1 : [1, 2, "..", 19, 20]
2 : [1, 2, 3, "..", 19, 20]
3 : [1, 2, 3, 4, "..", 19, 20]
4 : [1, "..", 3, 4, 5, "..", 19, 20]
5 : [1, "..", 4, 5, 6, "..", 19, 20]
6 : [1, "..", 5, 6, 7, "..", 19, 20]
7 : [1, "..", 6, 7, 8, "..", 19, 20]
8 : [1, "..", 7, 8, 9, "..", 19, 20]
9 : [1, "..", 8, 9, 10, "..", 19, 20]
10 : [1, "..", 9, 10, 11, "..", 19, 20]
11 : [1, "..", 10, 11, 12, "..", 19, 20]
12 : [1, "..", 11, 12, 13, "..", 19, 20]
13 : [1, "..", 12, 13, 14, "..", 19, 20]
14 : [1, "..", 13, 14, 15, "..", 19, 20]
15 : [1, "..", 14, 15, 16, "..", 19, 20]
16 : [1, "..", 15, 16, 17, "..", 19, 20]
17 : [1, "..", 16, 17, 18, 19, 20]
18 : [1, "..", 17, 18, 19, 20]
19 : [1, "..", 18, 19, 20]
20 : [1, "..", 19, 20]

Dunno if I should be proud of this or worried!