Of Google Hotel Finder and comparing Apple, Microsoft & Google

In an interesting critique of Google Hotel Finder, these lines stood out:

As Google grows, its willingness to float bad products is starting to seem a little bit similar to Microsoft, ten years ago. You know what’s also similar? Its dependence on a single cash cow that keeps them from caring whether any single side venture lives or dies.

Which leads us to:

The direct contrast of course is America’s best design-driven company, Apple. Steve Jobs would rather die than release any new product that wasn’t a step-wise improvement over everything that existed before. That’s the mentality of someone that cares about whether people use a product. It’s the mentality of a designer. Google’s mentality is that of an engineer, content to labor over one cool feature at the expense of creating any overarching value.

And finally:

As the example of Microsoft vs. Apple showed us, the engineer’s mentality can win early in a product cycle, when new features can create great advantages over competitors. But over time, as the tech gets commoditized, it’s companies like Apple, which are focused on integrating all the features, that create world-changing products.

8 Random Observations About Lion

Here are some random things I noticed during the first 3-4 days of using Lion. Since I haven’t added anything to this list in over a week, I think it’s time to post.

Keep Both Files

A new option has been added to the dialog box, when you try to copy a file over an existing file of the same name.

Keep Both Files

The “Keep Both Files” creates a file called “Firefox Copy” much like if you copy-paste a file in the same Folder.

Finder Remembers Folder Sizes

While re-calculating size of a folder in List View, Finder doesn’t “forget” the size from last time. It displays the old size in a greyed out font, until the current size is recomputed.

Finder Remembers Folder Sizes

Smaller Size

I didn’t capture the exact number in Snow Leopard but as per my observation, Lion installation over Snow Leopard was around 4 gigs lighter than its predecssor.

Better Quick Look

Two nice things about Quick Look, both related to video playback, something I do quite often. First, it no longer stops playing videos when you move away from Finder. Two, it resizes playback window size when moving from one video to another. Quick Look before Lion would stick to the window size of the first video, when jumping from one to the other using arrow keys.


No iSync

There’s no iSync application in Lion. But if you have access to Snow Leopard, you can simply copy over the application and it works fine. It even remembers your connected devices and settings, if you installed Lion over Snow Leopard.

No Front Row

Remember Front Row? Well Apple wants you to forget about it.


Safari is now broken into two processes – WebProcess, the Web/ rendering related stuff and Safari, which is just the application cover on top of that. This provides enhanced security by limiting the resources any malicious script can access.

Animations All Around

Here’s how I disabled system wide new window animations. Type this in Terminal, press Enter and restart Dock.

defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO

Next thing I did is disable the annoying animations in Mail.app as well. Restart Mail after this.

defaults write com.apple.Mail DisableReplyAnimations -bool YES

defaults write com.apple.Mail DisableSendAnimations -bool YES

Blaming Rafa for LFC’s troubles is like prosecuting Clinton for the Iraq war

Not as coherent or analytical as I would have liked, but it’s nearly 4:00 a.m. on what has been a long night and I need to get this off my chest, so here it goes…

6 points from 7 games is the worst start to a league season for Liverpool since 1953-54. While the ownership situation is largely responsible for the downward spiral that the club finds itself in, that alone cannot explain the recent run of results. After the latest humiliation of a home defeat to Blackpool, Roy Hodgson has come under a lot of criticism from a large number of the (usually patient) Liverpool fans. Is the criticism justified?

Some fans don’t think it is. As far as they are concerned, there’s only one man to be blamed for the mess – Rafa Benitez. These views are supported (or rather fueled) by large pockets of the English media, led by Sky Sports. Without getting into the details of their anti-Rafa, pro-Englishman, Xenophobic propaganda, this post will attempt to look at what blame, if any, indeed lies at the steps of the Spaniard.

Whose team is it?
With everybody fit, and let’s not get into how often that happened last season, this was pretty much Rafa’s first choice XI last season:

Johnson Carragher Agger Insua
        Lucas Mascherano
    Kuyt     Gerrard	Benayoun

Note: Agger was injured at the start of the season, then Agger and Skrtel took turns getting injured, and then Agger had a brief stint at LB because Insua was injured & Aurelio was never around. But everyone would agree that was Rafa’s “go-to” team.

Based on the evidence so far, this is the XI Roy Hodgson prefers:

Johnson Carragher Skrtel Konchesky
        Gerrard Poulsen
      Kuyt    Meriles  Cole

I can count four players that Roy has signed in there. Can any new manager, coming in at any club, anywhere in the world (other than Manchester City) expect to make more than 4 changes to the first XI in his first transfer window? I don’t think so. The team he prefers to use has four of his players, four players whose pedigree no one can question (Reina, Carragher, Gerrard and Torres) and another two who may not be everyone’s favourites, but are regular internationals for top European nations (Johnson and Kuyt). That brings us to the 11th player. Roy clearly prefers Skrtel over Agger, with the latter’s tendency to play the ball out of defense in contrast to Roy’s desire to see the team never lose its shape. Again, a decision made by Roy.

To summarize, that’s four of his signings in the first XI, and a fifth he’s promoted from 3rd choice (behind a fit Agger) to the firm incumbent in the second center-back spot. Again, how many more changes can a manager expect to make to the first XI in one transfer window at a club with limited funds?

Let’s take a look at it another way. Four of Roy’s players are already here. Another four that he definitely wouldn’t want to change (JR, JC, SG, FT). That leaves us with the other three. Does anyone really think Roy could buy a trio better than Kuyt, Johnson and Skrtel given the purchases he’s made in the current financial climate at the club? He’s shipped out 4 of last season’s XI in Insua, Benayoun (probably not his fault), Lucas (dropped to the bench) and Mascherano (wanted to go) and brought in Konchesky, Cole (talks were already underway with him when Roy signed?), Poulsen and Meriles. Which of those 4 names suggest that if Roy could have imposed more of his authority on the first XI suggests that he would have done a better job (especially in the current financial conditions).

Sure, the new guys need time to settle in. Then how about not throwing all four of them in at the same time. Why not let Lucas or even Babel start some league games over Poulsen or Cole, both of whom have been pretty ineffective, to put it kindly. Blending in two new players would surely be easier than blending in four? But by starting those four, you are putting YOUR stamp on the team Roy, so please, there’s no blaming anyone else.

What about the strange decisions of letting Insua and Aquillani go out on loans when everyone’s moaning about the size of the squad? It may have been down to cutting the wage bill (though I doubt Insua was making a killing), but, the way I see it, we exchanged Aquillani for Poulsen and threw in an extra 5.5 million pounds to sweeten the deal! Surely, you can’t blame Rafa for that?

I am not even going to talk about tactical decisions like playing Gerrard deeper, playing Cole on the left, using Babel as a striker because he “likes it there”, or preferring Skrtel to Agger for that matter. That’s because there are smarter people out there dissecting that already and, secondly, unlike the cold hard fact numbers of how much of the starting XI is Roy’s, tactics are subjective. What’s brilliant for one, doesn’t work for the other.


This Season

(LFC score first)

Arsenal (H) 1-1
Man City (A) 0-3
West Brom (H) 1-0
Birmingham (A) 0-0
Man United (A) 2-3
Sunderland (H) 2-2
Blackpool (H) 1-2

Overall record

7 1 3 3  6   7  11 -4

Home record

4 1 2 1  5   5  5  0

Away record

3 0 1 2  1   2  6  -4

Last season – Equivalent fixtures

(LFC score fist)

Arsenal (H) 1-2
Man City (A) 0-0
Hull (H) 6-1*
Birmingham (A) 1-1
Man United (A) 1-2
Sunderland (H) 3-0
Portsmouth (H) 4-1**

* West Brom qualified as 2nd ranked team from Championship and thus took place of Hull who finished 19th.
** Blackpool qualified via playoffs from Championship and thus took place of Portsmouth who finished 20th.

Overall record

7 3 2 2 11   16 7  +9

Home record

4 3 0 1  9   14 4  +10

Away record

3 0 2 1  2   2  3  -1

While critics may point at the deficiencies of such comparisons, and with good measure too, they definitely make for compelling reading. It’s true that Liverpool didn’t play these teams, in this order at the start of last season, and one bad result can snowball into a bad start if you have a difficult fixture list. But it’s also true that this is the closest we can come to making direct comparisons across seasons.

If you look at the equivalent fixtures comparison, the away record is almost exactly the same – draw at Birmingham and a narrow defeat at Manchester United. The biggest difference of course is the result at City where a goalless draw last season became a 3-0 drubbing this time. Money talks? Maybe, but that doesn’t explain the home record.

The narrow defeat to Arsenal from last year was improved to a draw. We played them off the park in the 1st half last season (which, amazingly, even Wenger managed to see and admit) but didn’t put the ball in the back of the net, and paid the price. On other hand, some may put this year’s draw as a harsh result after the Reds had almost held out till the last minute with 10 men, so you don’t always get what you deserve. It’s the other 3 games that really bring out the difference. Comfortable home wins were replaced by a narrow win, a draw and a defeat. While it’s true Portsmouth had nothing to play for when they came to Anfield last season (especially when compared to what we saw from Blackpool today), the same can’t be said about Sunderland or Hull, whose seasons where alive and kicking when they were dispatched comfortably last season.

Last season – First 7 fixtures

(LFC score fist)

Tottenham (A) 1-2
Stoke City (H) 4-0
Aston Villa (H) 1-3
Bolton (A) 3-2
Burnley (H) 4-0
West Ham (A) 3-2
Hull (H) 6-1

Overall record

7 5 0 2  15  22 10 +12

Home record

4 3 0 1  9   15 4  +11

Away record

3 2 0 1  6   7  6  +1

This comparison has been included just for reference. Even though it included away trips to Spurs, Bolton and West Ham, the Reds had a relatively easier fixture list in the first seven games of last season. What they did well last season, at this stage atleast, was winning the “home bankers” – Villa withstanding (if that can be called a banker i.e.).

Results – Conclusion
Not much to say. Nearly twice as many points, more than twice the number of goals scored, fewer goals conceded – clearly the Reds did much better in equivalent fixtures last season. The time based comparison is even more lopsided.

So what does this tell us? The simplistic can draw the conclusion that the new manager has come in, made some changes to the team and that hasn’t worked. So who must take the blame? Around 40% of the team’s starting XI is the incumbent’s, so he cannot claim for it to be entirely the previous manager’s fault. Besides, as shown above, the previous manager clearly did a better job in the same fixtures and the club was in a much healthier position in the league same time last year. Perhaps the problem lies in the missing 40% from previous season starting XI that have either moved on or been relegated to the bench? If that’s the case, atleast part of that blame is again attached to the incumbent since it’s his transfer policy/ tactics, albeit under the shadow of the financial cloud (which existed during the previous manager’s reign as well, lest Sky forget).

Eating jalebis, one bad driver at a time

While driving back home last evening I found myself constantly criticizing the driving sense (or lack thereof) of my fellow drivers. I blamed the drivers, the “mixed“ traffic pattern, and the authorities for issuing driving license to one and all, for the mess that is our roads. With these thoughts in mind, I was almost home, when I took a left turn and found myself “face to face“ with a sedan.

Now this guy was clearly in the wrong, but he didn’t even think twice before gesturing me to back up and let him go. I was in no mood to budge, not to mention I was right, and refused (at which point I may have used a certain finger to tell him to back up himself). After 5 minutes (kid you not!) of both of us sitting in our respective cars (did I mention I ate jalebis to show him I was in no hurry and would see this through?), he decides to get off and talk. He says that he uses this (wrong) route everyday while coming back from his office, so why don’t I just back off and let him go. I told him that I don’t care, you are in the wrong lane, and if anyone should be backing up, it’s you. Unimpressed, he goes back to his car.

We sit in our cars for another 5, maybe 10, minutes before he decides to back up and let me go & told you I wouldn’t budge. During that time, I had cycle-wallahs telling me “peeche kar lo na sir, kya jaayega“, another car lining behind the other car (again on the wrong side, needless to say), trying to honk his way out of trouble, realizing I won’t move, backing up, and taking another (wrong) route to escape our tamasha. I also tried calling cops, since I couldn’t find any around & I am still waiting for the response to my 100 call, Delhi Police!

In case you are wondering how our “shenanigans“ didn’t create a traffic snarl, it’s because instead of taking the designated left turn, people kept going straight and taking the 90-degree left as it’s the “done thing“ at that turn, perhaps the reason why our friend has made this his “regular route“.

Why did I do it? Let’s just say I had enough of people breaking traffic rules without giving it any thought. I wanted to teach him a lesson, though I am under no illusions that the lesson would last a lifetime, if he’s “learnt“ anything at all & he probably thinks I was someone with too much free time on my hand, and that he was a “bigger person“ for backing off. Would I do it again? Absolutely & unless I was in UP of course, where I would happily back off rather than risk getting shot!

Bespin Gotchas

In case of trouble connecting to Bespin from an external machine, try setting the IP address to

Either change the file pavement.py:

   # set to true to allow connections from other machines

Or pass it as a command line argument:

paver server.address= server.port=8080 start

In case you haven’t noticed, you can even specify the port to start on i.e. run Bespin on a custom port.

Get email updates when your IP changes/ Python DynDns update client

I use DynDns to map my ISP provided dynamic IP to a static hostname. For some reason, the DynDns provided update clients don’t always work for me and often leave my hostname pointing to a dead or (worse) someone else’s IP. I decided to take matter into my own hands and write a script that would email me my IP whenever my DHCP lease expired and my ISP issued me a fresh one. This would ensure I know how to reach back home, even if my hostname was pointing to an old IP.

While going through the DynDns API, I realized it was trivial to update the hostname as well, essentially replicating the functionality of the aforementioned client(s). So I decided to add that as well.

I know this functionality can be replicated via curl + sendmail, but Python is my tool of choice, so just live with it. Without further ado, here’s the script, with an explanation afterwards.

#!/usr/bin/env python
# encoding: utf-8
Script to email IP whenever it changes. Also updates DynDns hostname.
Version 1.0
Created by Kunal Dua on 2010-05-10
This program is free software; you may redistribute it and/or
modify it under the same terms as Python itself.
def send_mail(subject, content):
        import smtplib
        from email.mime.text import MIMEText
        SERVER = "smtpserver"
        PORT = 587  #Use 25 if this doesn't work
        USER = "username"
        PASS = "password"
        FROM = "IPBot <mail@example.com>"
        TO = "user+folder@example.com"
        SUBJECT = subject
        TEXT = content
        message = MIMEText(TEXT)
        message['Subject'] = SUBJECT
        message['From'] = FROM
        message['To'] = TO
        server = smtplib.SMTP(SERVER, PORT)
        server.login (USER, PASS)
        server.sendmail(FROM, TO, message.as_string())
def update_dyndns(theip):
        USERNAME = 'username'
        PASSWORD = 'password'
        HOSTNAME = 'example.dyndns.org'
        theurl = 'https://%s:%s@members.dyndns.org/nic/update?hostname=%s&myip=%s&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG' % (USERNAME, PASSWORD, HOSTNAME, theip)
        import urllib
        conn = urllib.urlopen(theurl)
        #print conn.read()
if __name__ == '__main__':
        import urllib2, re
        conn = urllib2.urlopen('http://checkip.dyndns.com/')
        data = conn.read()
        m = re.search('([0-9]*)(.)([0-9]*)(.)([0-9]*)(.)([0-9]*)', data)
        currip = m.group(0)
        lastfile = "lastip.txt"
        allfile = "history.txt"
        theipfile = open(lastfile,"r")
        lastip = theipfile.read()
        if lastip == currip:
                #print "no change needed"
                histfile = open(allfile, "a")
                import datetime
                thenow = datetime.datetime.now().ctime()
                histfile.write("%s %sn" % (thenow, currip))
                theipfile = open(lastfile,"w")
                send_mail(currip, '')
  • Lines 17-22 and 39-41 replace with your email and DynDns settings respectively.
  • Line 22 – My email provider supports redirecting mails to a folder by simply adding the name of the folder before @ sign. For example user+ipupdates@example.com will deliver mail in folder ipupdates of user@example.com. If your email provider supports this, it’s a useful trick to prevent these mails from cluttering up your inbox. If not, simply enter your regular email address.
  • Lines 60-61 initialize 2 files that I use. One is to store the current IP (or the last known IP) and the other is a history of all IP changes. The former is used to compare if the IP has changed since the script was last run and thus if an email needs to be sent + DynDns updated. The latter is not really needed for the script to function properly, and is used to maintain a log of all IP changes – because you can!
  • Line 78 – By default, the subject of the mail is the IP and the body/ text is blank. Feel free to obfuscate your IP if you feel paranoid about sending it in clear text or write sweet nothings to yourself in the body.
  • Note: Before you run this script for the first time, create an empty file called lastip.txt in the same directory as the script or the script will fail. I know I could write a trivial check for this, but I leave that as an exercise for the reader.

Recommended frequency of running this job via cron/ launchd is 10 minutes.

Update: (May 27) I am pretty sure the DynDns API is broken in some way because I can’t get it to update even with this script. The email part is working pretty good for me though!

On the iPad

I’ve been meaning to write a detailed piece of the iPad ever since it was announced, but knowing myself, it’s no surprise that I haven’t gotten down to it yet. So before everyone receives their iPads over the weekend, I would like to put some thoughts on record, essentially for me to look back at this article 3 years from now and see what all I got right 🙂 Not the detailed article I had hoped to write, but more like important points that need to be made. Some, of these points may have been made by someone or the other, I am not sure.

First off a couple of points, that should be clear to anyone who’s even heard about the iPad.

  • A device for technophobes

    The kind of device you’ll give your grandparents and forget about it, so they can do everyday things like check mail, photographs, videos etc. without having to worry about “fighting” with their computer. Without worrying about viruses, malware etc. For you and me, it means no more remote support over TeamViewer trying to fix their computer!

  • Geeks stay out!

    As a corollary of above, and as has been (very) well documented, not your cup of tea if you like to be in “total control” of your computer. The tight control that Apple has over the device is what makes the device what it is (in terms of usability as well as end to end user experience) and “hackability” has to lose out. 10 bucks says Apple comes out with a similar device in the near future that runs full OS X and is as geek friendly as OS X on the desktop. You can quote me on that!

  • Now that we are warmed up, let’s look at the significance of the iPad in the larger scheme of things.

  • Computing as an appliance

    Not sure if anyone has used this term wrt an iPad, but to me, this is, finally, computing as an appliance! You don’t care about the hardware inside your Television set, DVR or set top box, why should your computer be any different? The fact that you interact with a computer in far more complex and various ways as compared to, say, a Television, doesn’t mean it HAS to be as complex as that. An iPad (or for that matter any similar device that is capable of hiding the underlying complexity from the user) is finally going to unveil the joy and simplicity of using a “computer” to the masses. Of course, you may refuse to call them computers in the traditional sense, but they would do what most people wanna do with a computer – Connect, Consume (media/ games) and Create (basic documents/ spreadsheets etc.), what I would call the 3 Cs, if I wanted to sound like one of those B-school types.

  • iPad clones

    Ever since the iPad was announced, everyone has been playing the “me too” game. If these devices try to attend to the perceived “gap” that the iPad has (i.e. user being “in control”, hackability etc.) then they’ll just end up being slightly sexier looking version of netbooks. It’s going to be the iPod all over again, where the other players claim “but we offer *insert features here* that the iPad doesn’t have” and the market will just crap over them, because 95% of the people don’t care about those extra features. They just want to deal with the simplest device that doesn’t get in their way.

    The iPad clones that’ll have an impact will come from the people who learnt from the iPod scene and realized that cramming more features into your product isn’t the way to defeat Apple. Of course if anyone out there has actually learnt the lesson and is willing to build an entire ecosystem around their product(s) like Apple does is anyone’s guess. This “walled garden” approach that people (geeks/ commentators) criticize about Apple is what keeps the user happy. The idea that “if it’s in the app store it won’t crash and burn my computer”, works very well for most, thank you very much. If you look at the numbers, those who care about “openness” are an insignificant minority.

  • Apps not Safari

    One thing I foresee, which I haven’t seen mentioned elsewhere, is a move away from the browser as the starting point. Mind you, I am not saying a move away from WWW, even I am not that foolish, but I see Safari (or whatever your browser is on your “iPad like” device) being launched less and less. You wanna check your mail, you’ll use either the built-in email app or Google’s Gmail app. Weather? Weather Underground app. NYT? An app for that. Pictures from the vacation that your grandkids went on? Facebook or Flickr app.

    The way I see it, the app (or widget or channel as various platforms do or will call it) model relates much better to the way “regular” people consume information in the real world. You want news, you pick up the paper. You wanna see photos, go look at the albums etc. A different application (icon, essentially) for different tasks is easier to understand/ relate to for most people.

    Technically speaking, I see machine readable formats like RSS (or more likely some other format that serves a similar purpose) playing an important role with this. Not for consumption by end users, but by the apps/ widgets/ channels by the same content producer, but on various platforms. So NYT produces content and publishes it (at a private URL) in a machine readable format. The NYT app on the iPhone/ iPad/ *insert device here* connects to that URL, downloads the content and displays a version optimized for your device. MVC anyone? Pretty much what happens today as well, but with the wide variety of devices that we are likely to see in the future, this is going to really take off.

  • The iPad impact

    If you don’t know it by now already, or are one of the skeptics/ iPad bashers, let me tell you the impact this device will have is going to be huuuuge! And I am not just talking about the impact on Apple’s bottom line 😉 As I mentioned earlier, this will completely change the way people think about computers. This is the device we promised people when we sold them the idea of computing. Not machines that were breeding grounds for malwares and viruses or a gazillion other frustrations that regular people face when “confronted” with a computer.

    As I mentioned earlier, this is the beginning of a new movement. The iPad will force everyone to rethink the basic principles on which we have designed the user interfaces that we expose to the end users. Make no mistake about it, the entire “desktop” based UI paradigm that has been with us for 20+ years now is being challenged as we speak and “computers” as you and I know them today will perhaps we restricted to a small subset of the audience who extract a more specific purpose than the 3 Cs (see above). But the majority of the population don’t care about GCC, 3D accelerated video cards or the ability to run Logic Pro. The iPad and its approach to UI actually works better for them.

    At the risk of repeating myself, those who adopt this “new” approach, will be the winners and those who try to fit old ideas in a new bottle, like they tried on the mobile platform (a Desktop with a start button on a 2″ screen is a great idea honey!) will fail.

  • Flash killer

    Yes, the iPad doesn’t have Flash and unless the folks over at Apple have a drastic change of heart, it probably never will. Does that mean you will not be able to watch Hulu and the likes? No! It means that Flash would be used less and less because no one wants to leave the iPhone/ iPad guys out. We’ve already seen this before, when Youtube started offering MP4 versions of videos, atleast partially, to cater to the iPhone crowd. Even with the iPad there’s talk of people releasing optimized versions (e.g. TED, who’ve already done that I believe) and plenty of buzz around Hulu doing something similar. Expect almost all the major players to follow suit. And it won’t be long before they realize it’s not worth producing content in two different formats, and since the iPad format works well for non-iPad users as well, let’s chuck Flash!

    Adobe knows this, and which is why it has tried to publically put Apple under pressure on more than one occasion, including accusing them of denying access to OS X APIs. Of course, such methods don’t work with Apple (howz that countdown going Opera folks?) and, if anything, would have made the guys at Apple more determined to hold on to their post – as if they needed any more convincing! So while Flash may continue to be around for games and fancy UIs, its days as the de-facto standard for videos on the web are numbered.