Friday, December 28, 2007

Taare Zameen Par -- A (slightly) different perspective

The recent Hindi movie, Taare Zameen Par, was a refreshing change as far as movies from Bollywood go. It lacks all the loudness of the commercial cinema, and tells its story with a lot of love. Yet, it has the polish of a well made, well produced film -- something that the offbeat, non-commercial movies lack.

The reviews of the movies have mentioned it as a story of the kid who goes through a low and comes out tops thanks to the helping hand provided by his teacher. People find that they could relate to the kid in many ways. I actually had a slightly different experience -- I related just as much, if not more, to the teacher. In many ways, I felt this was a story of the teacher as much of the kid.

A review complained that the teacher having admitted to having dyslexia was a fault of the movie -- where I felt that was the whole facet of the movie that took it to higher level. Just as much it was the story of the child finding his way, it was the story of the teacher in some ways resting his demons. The story of the teacher wasn't developed as well -- but you could see him looking for himself in all the kids he spent time with, and trying to save them the pain he might have had to go through. Finding a child who he felt was a reflection of himself, the teacher finds a path too.

It may well be a viewpoint far removed from the majority of the movie goers. Anyone care to share what they thought?

Saturday, December 22, 2007

Random tidbits from Bollywood movies

Some random tidbits you might not know or might not have noticed...

1- Movies "Andaz Apna Apna" and "Mr. India" are related through their principal villains -- or rather their principal villains are related. Crimemast Gogo claims Mogambo to be his uncle ("Mogambo ka bhatija, Crimemaster Gogo!")

2- There is a sequence in the recent movie "Taare Zameen Par" where the kid is daydreaming class, imagining himself to be a space traveler -- a clear rip off of Calvin's alter ego Spaceman Spiff.

3- In "Om Shanti Om", one of the stars who comes in at the premiere is clearly channeling Mithun Chakravorty -- and Mithun himself shows up in a later song in the movie to do the same dance moves.

If you haven't seen "Taare Zameen Par," you should.

Tuesday, November 27, 2007

Only a couple of weeks ago...

I didn't realize I had posted only about a couple of weeks back. It seems a lot has happened in these two weeks.

Thanks to the success of some of our apps on Facebook, we ran into scaling issues the last few days. We went from one box setup to two and then to three very quickly. This was the one of those times when years of dealing with large scale problems at Amazon comes in handy. Above all, we were particularly pleased with the fact that our component based distributed system design allowed us to scale out with little headaches, and it gave us considerable flexibility in optimizing our systems.

Quite a few friends are now in the midst of their own startups, and when I share my lessons learned, I actually don't harp much on building scalable systems anymore. Product and monetization comes first, and I still believe if you need to build things to scale you'll be able to handle it. Just make sure you have the engineering talent for it. That said, if you are building applications on platforms like Facebook where, just maybe, your applications can ramp up to 100,000+ daily active users in a few days, you'd better plan for scaling upfront. I think, it would have been much more costly for us to scale had we not built our systems well the first time around. But even then, every such problem is unique, and you will have to handle new problems when you do run into scaling issues.

In the midst of this I managed to sneak away to Hawaii for a short trip. If you haven't been to the big island of Hawaii, I suggest you pack a bag and go. Snorkeling on the west side -- particularly the Cook monument -- was probably the best we've experienced in the state of Hawaii.

Tuesday, November 06, 2007

Facebook ads: More hype?

It's no secret we've been developing apps on Facebook for Jambool. And where the more involved apps have had a hard time taking off, the brain dead ones are rocketing up. In the last one week we added more than 50,000 users without spending a penny on advertising. Now there's got to be some value in that.

Facebook announced today that they are coming out with "Facebook Ads." Techrunch covered the announcement in New York. This stuff has been speculated for a long time. Facebook already has their ad network -- it's called Facebook Flyers. And going by the ads I see on them ocnsistently, my guess is that they are not doing that well. We even tried using them sometime ago, and ad clickthrough as well as conversion from these ads was abysmal. So are things set to change with the new release?

I don't think so.

I'm trying to understand what they are offering, and here's my understanding. Facebook does provide advertisers the ability to target ads for specific demographics and user attributes (age, location etc). But this is what they do with Facebook flyers -- and afaik it is not a successful program. I think the important factor in ads that helps convert users is not as much just the targeting but the context that the ad is displayed in as well. This is where Facebook seems to be missing out. They talk about beacons and insights -- that people can be walking billboards for brands they love, and spread the virus into their network. So you can publish your purchases etc to your friends, advertising the web site you bought it from. While useful, I would wait to get some numbers on this data to see if this is really worth anything. Because my friends bought "something" at Ebay doesn't make me jump on and go to ebay. It reeks of advertising, not a recommendation. Besides being a privacy concern, I am not convinced that users will want to have their purchases get published to their friends.

The talk about "Insights" seems to be wishful thinking. They "will be able" to track how much people are talking about the brands in forums, which forums and brand pages the user goes to, and target the ads better. I suspect that there is no data that they have to back up their claims -- What is the actual impact they can make for a brand? It isn't even anything new. Companies like doubleclick and Google have cookiess in just about every browse out there. They know which sites you go to, which brands you visit, etc etc. Or at least they are in the position to. They may not know the specific age and sex and favorite color and pet peeves of every user, but when you have enough data about the user through the kind of sites he/she visits, this data starts to become irrelevant -- especially if the end goal is to just target the ads for that user. Age and sex be damned, just show the ads to the user that he or she is most likely to click on. That's the best service you can do to your advertisers and publishers.

It also seems that Facebook is not really providing application developers a new avenue to make money. They seem to be intent on being the publisher for all ads, and attracting the advertisers to put ads -- including application developers. At least I did not read anywhere that they are providing a means for developers to monetize through Facebook ads. This, I think, is where they are missing out. There is more money to be made by sharing the pie with developers than with getting the developers to pay for getting traffic. This would mean, that developers will continue to stick with the existing ad networks to get ads for their pages, and as a result, advertisers will also continue to advertise on these networks.

So my reading of the Facebook ads is that it is more hype than substance. Life's going to go on just as it was.

Tuesday, October 02, 2007

Facebook ad to app install conversion

Just posted another update on optimizing ads to app installs on Facebook.

Give it a read if you are interested.

We also launched an update on Balloonz: users can not create their own fillings to put in the balloons. Today, just five days after launch, we are crossing 3K users!

Have you thrown a balloon yet?

Wednesday, September 26, 2007

Throw a balloon at friends

The latest rage on Facebook is Balloonz!.

It's a fun little app that lets you stuff things in balloons and throw at friends. Friends can dodge them by sending them on to someone else. The fun continues until the balloon explodes...

Come, throw some! :)

Recalling an interview on TV with Lata Mangeshkar

I was reading some coverage of the felicitations of the Indian cricket team for having won the world cup. Of course no one expected them to win. Every victory seemed like their last. But that didn't stop the ministers and the who's who to bask in refelcted glory.

The incident I was reminded of was what Lata Mangeshkar -- who if you don't know about happens to be the female voice of just about any Indian film song you heard from 1950 to 1980 -- recounted in a TV interview.

Lata had sung a "patriotic" song during the Indo-China war days in 1962 for India's prime minister Jawahar Lal Nehru. As it happened, Nehru was deeply touched by the song, and shed a tear. Lata was hurriedly called back to meet Nehru after the performance, and Nehru told her that she had made him cry. This incident became a huge rage. And it spun off a weird fad. Whenever Lata was performing live at a show, ministers and babus would sit in the front row, and have her perform the same song she did for Nehru. And... they would cry.

Friday, September 21, 2007

This one's for the gallery

Six sixes off six balls. This one thing alone makes up for a lot of could-have-beens-that-werent from the Indian team. Yuvraj's the man!

Sunday, September 16, 2007

Tracking Facebook ad to install conversion

This is a problem we were looking into for some time, and we released an application to track these better for us.

Read more about it here.

It might be insightful anyway to read it if you want to advertise your apps on facebook.

Friday, September 07, 2007

Gripe of the day

Why do sites require me to provide my birthday, my zip code, my email, my dog's name, my school's name, my roommate's name, my favorite color... Why? When will websites learn? Why is this information relevant to them?

I just today tried to sign up for Mashable. I don't even remember why. Here's what their sign up page looks like:



I tried ot leave a few of them blank and sign up. It didn't work. No I did not sign up thank you. My stupid old internet life is fine enough without sharing all my personal data with every tom, dick and harry.

Have you shared a memory yet?

Where have you been? Here's a link to the Facebook app. Shared Memories.

Vote for it on best of facebook here.

Also -- if you are building applications for Facebook, you might be interested in the blog post here.

Looking forward to Shoot em up

I've seen the trailer online a few times and I am all for it. Shoot 'em up, Clive!

Ever since I saw him in Greenfingers, I've been a fan of Clive Owen. That was years ago, and this guy seems to go from strenght to stength. Shoot em up seems to have everything going for it -- they even roped in Monica Bellucci! Paul Giamatti is an odd guy -- Sideways seemed ot suit him just right -- but he looks irritating enough in the promos that him getting his ass kicked is probably going to be double the fun.

Trailer...

Friday, August 17, 2007

Jambool's alexa graphs now online...

Posted on Jambool blog... here.

Aside from that, we happened to get the Shyam Benegal movie Suraj ka Satwan ghoda from Netflix this week. I had seen this a long time ago -- and it came out much before the multi-threaded stories were all the rage. This is pre-Tarantino, pre-Amorres Perros. It makes a great watch, and definitely one of the smarter movies to come out from India. It's a pity it is not as well known.

I've been collecting Anthony Lane movie reviews on Jambool here -- they make an absolutely fabulous read every time. What's your favorite Anthony Lane review?

Tuesday, August 14, 2007

Update..

It has been a gruelling time, trying to get Jambool to the next stage. The best advice I ever got for my startup was to find a co-founder. And Reza's the best. Those who knew us at Amazon probably remember our April fool emails and announcements.

The best part of working with someone you enjoy working with is that however hard your job is, in the end it's heck of a lot of fun.

Jambool's Alexa rank is on the rise. It's moved to within the top 150K for the last two weeks' averages. 3 months is still low, but we'll get there!

I saw Bourne Ultimatum -- and I think the second one was better, though people claim this one tops that. What the movie did interestingly was to quietly spoof the deeds of the current administration -- from wiretapping and refusing to answer to reason and so on -- but did so without making it too farcical.

I saw another movie called "Once" -- an Irish movie with good soul and music (pun unintended). Recommended when you can find it. It's playing in a few art house theaters in San Francisco these days.

P.S. I just happened to press "Ctrl-E" when editing this blog. And it worked. Blogger editor support Emacs keys? Or maybe it is Safari? Something feels better in this world already. The geek in me awakens. :-)

Friday, August 03, 2007

Amazon 'Flexible' Payments launches...

Amazon.com launched Flexible Payments web service this week.

It's already on Reddit -- with plenty of people welcoming it. Like people say over there, Amazon's track record of extremely easy to use web services API should definitely give Google and Paypal worries with this launch.

Why am I blogging about it? And is it really that cool?

Well -- the primary reason I am blogging about it is that this was some of the best things I was involved with at Amazon. Over a period of about a year and a half that I was involved with Amazon FPS, we conceived the product and built a truly solid team in India to develop this product.

And yes, it is really that cool. The Payment Instructions component of the API give you, the developer, unparalleled control over the transactions that follow. Using these instructions you can describe a whole negotiation between multiple parties. Each participant in the transaction can have their own set of instructions -- these are rules that have to match against each other in order for the transaction to go through. Can you imagine the possibilities? You can choose who not to do business with, what payment methods to accept (only accept direct debit, get the fees down), set minimum amounts, etc., etc.

Among all the services Amazon's rolled out, this one is probably the most complex in its interface to the developers. The world's been raving about and using S3 (and so does Jambool). Amazon FPS is the other service that I am sure is going to get lots of positive buzz. And deservedly so, even if it is a somewhat biased view.

Kudos to a lot of people and dear friends at Amazon who've brought FPS to light.

Friday, June 29, 2007

In India in July

I will be in India in July. While mostly a family and friends visit, Jambool will of course still be high on my priorities.

People whom I haven't already touched base with: I will be in Delhi for a week till about the 11th, and I will be in Bangalore for a day on the 7th and the morning of the 8th. Most of the rest of the time I will be in the beautiful city of Chandigarh.

More updates on Jambool...

In case you haven't read them yet, we released an update to the Firefox browser extension, and also rolled out some changes to the clipping dialogs. More here.

Sunday, June 24, 2007

What does Google know about me?

Awfully lot, I imagine.

Let's see -- I started on Google search. I jumped on Gmail -- the first time I created an account. I used Google news -- though I hated their personalized news stuff. And since I was always logged on in Gmail, I couldn't really turn off this personalization. Then Google bought Blogger -- the site that hosts this blog -- and went on to buy yet more stuff (You tube for one) where I may have logged in. Everywhere I turned soon, Google login was following me. And then they bought doubleclick. Now, add the two together, that covers probably an incredible amount of information about me being tracked by them over time.

In general, I've loved Google products -- just like most of the people I know. Even then, it is a little unsettling to know that people with the smartest data mining algorithms are going to have a lot of data about me to play around with.

So, what's the solution? For one, I've blocked Google.com cookies. I use Apple's iChat if I need to use Google talk (so I don't have to have Gmail in the browser). I use a POP client to get my Gmail. This also, unfortunately means I can't login to Blogger and Adsense on the same machine -- or at least that browser. So I sometimes fire up Safari if I do have the urge to write a blog, and shut it down once I am done.

On a different, unrelated note, Jambool's releasing updates to its site. If you have an account, do come back and check it out!

Saturday, June 16, 2007

Ocean's thirteen -- a joke I felt 'in' with...

All successful movies tend to become franchises of sort these days. Those involved milk it repeatedly for what it's worth. Whether it's the Pirates, the Shrek or the Ocean's teens. Back in India, movie makers are picking up on it as well -- Dhoom, Don, Koi Mil Gaya, Hera Pheri have all had or are going to have sequels.

Ocean's eleven was entertaining. Ocean's twelve kept true to its entertainment value. With Ocean's thirteen, the movie makers seem to have got rid of any pretense they may have had about making a movie. It just seems like a bunch of friends having a good time, and expecting you'll just follow along. Every other line is some sort of an inside joke that you feel left out of.

Except there was this one time, where someone walks up to Pacino in the party, and congratulates him on "the enormity of his success!" Aha! (See previous post) I think I was the only one who laughed at this one. Oh well.

Anyway -- I haven't posted for a while, and this was a good excuse to break the hiatus. Jambool is keeping me busy... but now that our beta is live, I hope to get time to do some other things once in a while too. :)

Thursday, April 19, 2007

The enormousness of some mistakes

The Economist style guide is making the rounds on the Internet. It's a decent read, and I am posting it here to point more people to it.

Also, I wanted to rant about the very frequent misuse of the word "enormity" that I see everywhere. I've seen this on otherwise excellent literary stuff, and it seems to be very widespread. First off, "enormity" is not the same as "large" or "enormous" -- in fact it means something of an enormous mistake, an extreme absurdness. When news sites report about the "physical enormity" of players, and "enormity" of devastation, it reads as an enormity in itself.

"Enormousness" is the word you might be after if you've used enormity wrongly. It is, unfortunately, a larger word, not so easy on the tongue or the ears, and therefore suffers from lack of love.

Tuesday, April 17, 2007

On this and that..

There's a lot going on right now -- Jambool is getting ready for the next major release. So there's little time for anything else for me right now.

That said, I couldn't stay away from "Grindhouse" and the "The Host." Grindhouse is by Tarantino and Rodriguez, and it's everything you'd want from them. Rodriguez delivers it much better than Tarantino though, I think. If zombies and gore and yuck is your thing, this movie delivers. It's a send up on umpteen B-movies from the 70s, and Rodriguez executes on the idea simply brilliantly. For me, it was a laugh riot.

"The Host" is new movie by the director of "Barking dogs never bite." The dogs movie has been one of the best movies from South Korea, and "The Host" is an excellent follow up. It's a film that doesn't try to fit into any genre, and embraces humor and irony where you'd least expect.

Jumping topics... I upgraded to Firefox 2.0 recently on my Mac, and it is ridiculously slower than 1.5. So much so that I've often switched to using Safari or the older install of Firefox.

Friday, March 23, 2007

Indians (not) at the world cup...

Just when we were thinking this Indian side has the best shot at the cup, they go out and prove a point or two -- other teams are just better than them.

Wednesday, March 21, 2007

Closures in Javascript

I've grown up on C, and then a bit more on C++. I used to write a lot of networking and systems code, and then application level code to build backend distributed systems for an online retailer. Having dabbled a little bit in Java, and even less in Lisp, I've adopted Ruby as the language I mostly code in these days. But all these languages were a charm to get used to and develop in when I compare them with Javascript.

Why? Several reasons, but primarily because so much of the Javascript is about the browser, and while how you do something depends entirely on which broiwser your code is going to run on, there is hardly any good development and testing environment. To top that, I've not had the pleasure of reading a really good reference-like book for Javascript. If you know one, do tell me about it.

With the lack of books, one tends to rely on Google search to throw up some useful results. But some things are what you have to go through to pick up anyway. That brings me to closures. Though people have written about closures, they tend to only cover one aspect of lexical binding, and I wanted to add to this pool of collective online intelligence.

Closures let you define functions on the fly that are bound to the local lexical scope. Using these closures you can execute code that will use and affect variable references as available in the lexical scope of where the function is defined. Here's an example:


function f1() {

var letter = "A";
return function() { alert(letter); }

}

function f2() {
var letter = "B";
var f = f1();
f();
}

f2();


Run it here
.

The function f1 above returns a closure. The function returned is bound to the lexical scope of function f1. Once f1 is done, one would think that the all local variables etc are removed, and calling the function that is returned back by f1 should really use "B" as the value of the letter. Or maybe you would expect it to raise an error, because the scope of function f2 doesn't exist anymore. But if you run it, you'll still find that the function f returned by f1() call alerts with "A."

Once you see this, it is somewhat obvious what is happening. Except one thing, and we'll come to that shortly. What seems to be happening is that when the function in f2 is created (or rather the closure), it keeps track of its lexical scope. So all the references available in its scope are available to it. The reference that is returned is a reference to a set of code and its scope as was available then. That scope is what is used to execute the code in the closure.

What seems to be slightly less obvious is that the closure captures the references and not the values of these references in its scope. I.e., the closure does not copy all the values of the variables in its scope and keep them around for later. It keeps track of the references in its scope. If their values change by the time the closure is called, then the result would be different. Here is an update to the above example.


var letter = "A";
function f1() {
return function(callfrom) { alert( callfrom + " " + letter); }
}

function f2() {
var letter = "B";
var f = f1( );
f("call from f2");
}

function f3() {
letter = "C";
var f = f1( );
f( "call from f3" );
}

f2();
f3();



If you run the code above (here), you'll find that the call from f2 uses the value "A" for letter and the call from f3 uses the value "C."

The reason is again obvious once you see it, but it is easy to trip over this when using closures bound to variables in a loop. In the code above, f2 creates a new variable letter in its scope. This variable is not available in the lexical scope of the closure returned by f1. f1 uses the earlier defined letter. However, f3 does not define a new variable -- it updates the variable in global scope, the same variable that is also used by f1. The call from f3 to the closure evaluates the variable (the reference) 'letter' and it evaluates to "C" and not "A."

An important ramification of this is that when you are creating closures as callbacks inside a loop, and binding them to the variables that change with every iteration of the loop, you have to be extra careful. Unless you want to use these variables' values as they exist after the loop is done (or whenever the callback is called -- which might make it unpredictable), you have to create unique lexical references for each of these variables. A simple way to do this is to write a method that returns back the actual closure bound to its local variables. Every time this function is called, it generates a new scope for the closure. An example:




function myFunctor( x) {
return function() { alert( x); }
}

function testGoodFunctor() {

var functors = new Array;
for( var i = 0; i < 3; ++i ) {
functors.push( myFunctor(i) );
}
for( var j = 0; j < functors.length; ++j ) {
functors[j]();
}
}

function testBadFunctor() {

var functors = new Array;
for( var i = 0; i > 3; ++i ) {
functors.push( function() { alert(i); } );
}
for( var j = 0; j < functors.length; ++j ) {
functors[j]();
}
}

testGoodFunctor();
testBadFunctor();


If you run the code above (here), you will see three alerts with values 0, 1 and 2, followed by three alerts with value 3.

The reason, as you would have gathered by now, is that in the testGoodFunctor, each closure gets a unique reference for the alert call. However, the testBadFunctor provides the same reference "i" to the closure. When the closure is actually called, the value of i is the value it is supposed to have at the end of the loop.

There now, that's closures for you. And yes, there is one more thing to remember. Be careful not to use "this" to point to the object inside the closure (unless you know exactly what you are doing). "this" is not a locally defined reference, and when you closure is invoked, "this" may point to something completely different. If you want to invoke your methods on a specific object, it is better to create methods that are bound to the specific object. For example, like this:



function getObjectBoundMethod( obj, f ) {
return function() { return f.apply(obj,arguments); };
}

function f() {
this.g = function(x) { alert( "x = " + x ); };
var closure = getObjectBoundMethod( this, this.g );
return closure;
}

var to_call = f();
to_call(5);



Here, run it.

Update: Fixed the links to the running javascript samples.

Thursday, March 15, 2007

WC07 - Best Indian World Cup side ever?

1983 world cup happened when I was still too young to build a lot of memories. But I recall the years immediately after that, and the build up to the 1987 world cup. We all expected an India-Pakistan final. It was a team that had notched up some away one-day series wins, and looked good in general.

From then to now, India's fortunes have been mixed. India's never lacked some great cricketers in its team, who have bolstered India's chances and kept interest alive. But as a team they tend to falter more than they succeed. When we win a tournament, it is always somewhat of a surprise -- pleasant one, though. Until the recent spate of 17 wins in a row, Indian batting always felt brittle -- it would collapse under the mildest of pressures. The 2003 World Cup final was the ultimate let down.

However, there are reasons to hope for more from the current Indian team. The biggest reason I see for this is that there are a few players who fought hard to come back into the team and the team largely is made up of people with solid recent form -- except Sehwag, who seems to be the captain's gamble. Zaheer Khan and Ganguly would know the value of form and performing -- both having spent time outside the team and worked it back in. Tendulkar and Dravid remain the pole around which the Indian tent is pitched. And then there are Dhoni and Yuvraj. Indians have a decent bowling line up -- and I hope Irfan Pathan fires up.

Looking at the lineup, this may be the best side India have sent to the world cup. That said, wouldn't you agree that India is probably also the likeliest of the big teams to be upset by one of the minnows?

Tuesday, March 13, 2007

Cricket World Cup

Cricket world cup used to be an all-encompassing month some years back. Even now, I am pretty excited about some high quality cricket -- though I'll have to rely on youtube and the likes to catch the highlights.

As many have said, this is probably one of the most open world cups. Several teams have been gearing up for the contest well -- building up form and momentum for the event. I expect Australia, South Africa, India, Sri Lanka in the semi finals -- though New Zealand, West Indies and Pakistan can easily replace any of them. England, despite their recent wins, seems to lack the ability to make it to the last four. But then, who knows.

This is probably the last world cup for many greats of the game -- Tendulkar, Lara, Dravid, Ganguly, Gilchrist, Ponting, McGrath, Jayasuria, Shaun Pollock. It's a joy to have most of them in good form all at the same time for the world cup.

Thursday, March 08, 2007

Afternoons in Napa

San Francisco is a by any standards probably one of the best places to live. The restaurant scene alone in the city can spoil you to the extent you won't want to live anywhere else. And then there's Napa.

We've been to Napa a few times recently, not entirely by plan. We tried a few wineries -- not all of them by plan. The one winery we did plan for worked out very well -- the Caymus vineyards. If you are ever in Napa, plan for a visit to their tastings -- it's by appointment only, and their Cabernets are wonderful.

The other winery I've come to like a lot is the St. Clement. It is perched up on a small hill south of Calistoga, and the experience of sampling their excellent Cabernets and cheeses in their small garden overlooking the valley rejuvenates you more than a week in a spa.

World's Fastest Indian

A couple of quotes kind of stood out from this Anthony Hopkins movie. Inspiring, motivational quotes, if someone cares for them.

If you don't follow your dreams, you might as well be a vegetable.

Another one, on the similar lines.

If you don't go when you want to go, when you go, you'll find you've gone.
Lastly, something from Theodore Roosevelt. I am copying the entire original quote:

"It is not the critic who counts: not the man who points out how the strong man stumbles or where the doer of deeds could have done better. The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood, who strives valiantly, who errs and comes up short again and again, because there is no effort without error or shortcoming, but who knows the great enthusiasms, the great devotions, who spends himself for a worthy cause; who, at the best, knows, in the end, the triumph of high achievement, and who, at the worst, if he fails, at least he fails while daring greatly, so that his place shall never be with those cold and timid souls who knew neither victory nor defeat."

Needless to say, everyone needs a motivational speech every once in a while. Something to keep the energy level high when chips pile up on the other side of the table. That said, I have always been on the cynical side of these motivational words -- I used to flaunt a poster from Despair, Inc in my office for a while. Maybe there's a middle ground somewhere. :)

Tuesday, March 06, 2007

The Lives of Others

I happened to see this wonderful film a few days back. It is a gem of a movie, fully deserving of an Oscar ahead of Volver, Pan's Labyrinth and Water.

People make a loot of hoopla over Water in India, and I found the movie quite ordinary. Deepa Mehta deserves accolades for her courage and conviction, but I've never felt her movies are great cinema.

Back to the German movie I started about -- it's worth seeing for many reasons. There was one thought that struck me that I kept thinking about afterwards. While the movie was about the 1984-ish East Germany, in some ways it was about a simple scientific principle as well. In any experiment one cannot expect to be a spectator alone and not impact the actual experiment -- by observing we become a part of the experiment, and that changes the outcome.

I highly recommend the movie. On another, though somewhat similar, note, I finally managed to watch the Hindi adaptation of "12 angry men." The Hindi movie is called "Ek Ruka Hua Faisla" and it's now available in Indian movie stores here in the US. The movie attempts to make a point -- expressly menioned at one stage -- that as a jury we need to keep aside our emotions and prejudices and judge objectively. That, my friends, is hard.

Saturday, February 17, 2007

Configuring Postfix to forward emails for multiple domains to local mailbox

A friend was recently looking to configure postfix, so that he could send emails from his laptop to several domains and have all of them show up in his local mailbox. I'm posting the simple configuration for postfix that helps make this happen.

  1. Check your postfix configuration. If you don't already have postfix, you can get it here. The instructions below all assume you have a Unix OS and shell. I did the below on a Mac OS X as well as a Sun OS host. I am sure it almost identical on most Unix environments.
    • Check that you have the postfix executable installed. (Usually in /usr/sbin/postfix)
    • Check that the configuration directory and files exist. (/etc/postfix/main.cf)
    • Ensure you have the access to edit the configuration files and create files in the postfix configuration directory. You will also need to restart postfix.
2. Edit the /etc/postfix/main.cf file. Add these lines at the end: (double check to make sure your spellings are correct. :)

# Testing virtual host domains
virtual_alias_domains = testdomain1.com testdomain2.com
virtual_alias_maps = hash:/etc/postfix/virtual


3. Edit /etc/postfix/virtual, and and these lines: (Replace recipient by any Unix user account you want to receive emails on your machine).

@testdomain1.com recipient
@testdomain2.com recipient


4. In the directory /etc/postfix, run the following command. This creates the hash database file needed by postfix for virtual alias table.

$> postmap hash:virtual


5. This above command would have created the file virtual.db in this directory. Verify.

6. Restart postfix. In case postfix is not running, you use "postfix start" to get it going.



$> sudo postfix reload
postfix/postfix-script: refreshing the Postfix mail system
$>


7. Test: (the user running the second command is the user whose account emails are being forwarded to, as per the settings in step 2 above).



$> mail -s "test mail" anyuser@testdomain1.com < /dev/null
Null message body; hope that's ok
$> mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/vikasgupta": 1 message 1 unread
>U 1 vikasgupta@localhost Thu Feb 15 11:33 16/505 "test mail"
$>


Postfix comes with plenty of documentation on how to configure and use it. For more details on the above configuration, look at the VIRTUAL_README in the postfix distribution. The utility postconf is useful to review the configuration once you've reloaded it into postfix.

Saturday, February 10, 2007

Whither India?

Debate's raging, it seems, on India's contention for the "next superpower." There's a CNN article that naysays it pretty loudly. Of course, if you are in India you can hardly escape the constant bombardment of the opposite.

India's contending for a permanent seat in the Security Council. India's sustained a growth rate of 8% year over year for four straight years. If you believe the economists in India, the country can sustain this growth forever more. Last Economist issue stressed the need for investment in infrastructure for India to be able to sustain this growth.

I spent a significant part of the last two years in India. I was based in Bangalore. I travelled through Mumbai, Chennai, Delhi, Pune. Being in Bangalore, it is impossible to get away from the constant buzz. Salaries jump at a phenomenal rate every year -- for the software/IT industry at least. We were desperately seeking engineers, and so was everyone else. In the end, it was hard to find talented engineers with significant experience, and still harder to hire them and nearly impossible to keep them happy.

Of course, it is tough to stay happy in a place like Bangalore. There are parts of Bangalore you may visit that remind you why this ruckus started in the first place -- the campus of IISc comes to mind. I recall one funny incident that highlighted what a mess this place has become.

I had landed at the Bangalore airport, and was taking the office taxi home. In order to get to my house, the taxi had to go through the central business district. No to say, the airport road itself -- that probably packs more vehicles per square inch than anywhere else in the world.

When I told the driver where I needed to go, he simply said, "No sir. We won't go there." Huh? I told him, gently, that I need to go there and he has to take me there. "No sir. We'll go somewhere else. Too much traffic, sir. Where do you want to go sir?"

Well, he finally came around, and we inched along.

The moral of the story is -- infrastructure in Bangalore, and many other places in India -- needs serious investment. It is improving, but not it's not keeping pace with the growth. In places like Bangalore, it is crumbling.

Superpower? Whatever. The term itself seems to be a leftover from the 80s.

Rails

I posted a couple of handy techniques for Rails here.

Anthony Lane is raving about the German movie "Lives of Others." It's yet to make it out to SFO, though. Economist recently carried an article about the resurgence of German cinema, and it makes references to Lives of Others as well.

Saturday, January 20, 2007

It's not the years...

During our trip to New Zealand, we had rented a car to tour the South Island. Everything was great, except that the car was quite below expectations. For starters, it had 160K miles on it. So, naturally when returning the car, we had some complaints. The guy argued that it's just two years old.

"It's not the years, it's the mileage!" said I. Of course, it didn't matter much to him, but I had the smug satisfaction of mouthing a neat quote from Indiana Jones.

New Zealand trip was great. We did the luge in Rotorua, bungee in Queenstown and sea kayaking in Milford Sound. It was rainier than expected, but didn't really make much of a difference in the end. Queenstown must be one of the prettiest towns in the world. Now I have to make it back there for snowboarding in their winters.

Tuesday, January 16, 2007

Bungee jump video...

I edited away the first non-jump :). This was really scary for me. I am sure it is easier the second time around -- though why I would want to do it the second time around is something I don't have an answer for.

This is off of the Kawarau river bridge near Queenstown in New Zealand. Apparently this is the first place in the world where bungee happened.

Enjoy!