< March 2007 >
     1 2 3
4 5 6 7 8 910
Thu, 29 Mar 2007:

Immediately after announcing the Y! mail unlimited storage, the webservices api for Y! mail has also been announced. The API is loosely modelled over NNTP and IMAP (and when I say loosely, I mean the designers read both specs *heh*) and has some really interesting features. But more importantly, now you can do cool things with it.

About 4 months back, one of the mail backend developers, Ryan Kennedy, visited Bangalore to talk about the internal workings of this awesome API. I'd gotten slightly interested because there was talk about a JSON based API which looked a lot easier to use from Javascript land. And when the hack day came around, I had managed to hack up a pretty decent Y! mail reader interface using XUL, which I named Tapestry.

Most of the XUL code is pulled out of Thunderbird code and a large amout of the UI is controlled by CSS. The XUL css selectors are really funky - take a closer look at my css for how the different styles for messages (read, unread, replied) is css based rather than with code in Javascript. Also I played around with image slicing with CSS to put all my toolbar images into a single image and using rectangle clips to use them in appropriate buttons. In short, I had a lot of fun learning stuff to write it. But the problem was that having done it, I couldn't really show it to anyone outside the company - but now I can.

But before the demo, let me quote my bloody stupid threading code which I wrote in under twenty minutes, which unlike jwz's threading algorithm, mine handles only In-Reply-To based mail threads. But the cool part is that this function is sort of "re-entrant", so calling it multiple times from async response code manages to simulate threading as an when a message is fetched - not having to wait for all the messages to load up.

Folder.prototype.sort = function() {
    for (var i=0; i<this.msglist.length; i++) {
        var msg = this.msglist[i];
        var parent = null;
            if(msg.parentid && (parent = this.msgidmap[msg.parentid]))
                msg.parent = parent;

I don't want to attract too much attention to the hack, because of some hosting issues. So if you'd really like to see it in action and have a Y! mail beta account & run firefox 1.5/2.0, keep reading.

Ryan had hosted an in-colo mirror of my hack - it might be slow to load the images because those are on-demand and not JS pre-fetched. It is my initial release and a lot of buttons and menus don't work there. Not much has been done on top of this, but the minimum functionality works and you should probably scroll through with the keyboard which is something I *really* need. I'm sure the layout code could do with a bit of work, especially on widescreen monitors - but it was something I did for fun. The code should prove interesting to anybody who wants to read it, because I've tried a few new things with javascript and generally that has come out really well.

Always do it right. This will gratify some people and astonish the rest.
                -- Mark Twain

posted at: 18:45 | path: /hacks | permalink | Tags: , , ,

Fri, 23 Mar 2007:

Every company has its own unique attitude. Now, I lament a bit about some stuff in Yahoo! I never got to experience - its fun side. I did catch the tail end of this phenomenon, but here's a blast from the past about how different the times were in the last millenium.

This is one of the cards from the Yahoo!-o-poly which was given out as the year end gifts in '99. There is a fair bit of company history hidden inside those images like the Say 'No' to AOL card or the reply to all card.

Somewhere along the way, that sense of humour seems to have been replaced with suit & coat seriousness. Maybe not with the old folks, but every hire you make you dilutes the culture if you fail to inculcate the same in him - which requires slow growth and mainly of fresh talent. A crowd of new joinees in their thirties is impossible to subvert to local cultural standards.

But let me say this - mourn not for what some never had.

Some changes are so slow, you don't notice them;
Others are so fast, they don't notice you.

posted at: 04:14 | path: /yblr | permalink | Tags: , , ,

Sun, 11 Feb 2007:

Oh, how often has that tired old line been repeated. But now, there are a lucky few in Yahoo! who can back it up with a certificate, which looks something like this.

The card is given out once you take a trust fall, where the other guy/gal catches you while you fall and push you onto the soft padding. The card, on the flip side, has more content and it goes like this.

I've got the expertise to make the right decision here. So let me. 

Once you accept this card, you agree to avoid second-guessing me, 
escalating the situation, or switching on the blamethrower. 

If it works out, great. If not, I agree to take a fall.

Oh, and it says on the bottom - may not be transferred, sold or substituted for U.S dollars - maybe I should try paying it with some real geek money, like pizzas, beers or t-shirts.

Cheesy, cheap and corporate - but the designers had their hearts in the right place. And If you liked it, take a look at Yahoo! Bangalore's campus brochure.

Who does not trust enough will not be trusted.
                -- Lao Tsu

posted at: 09:52 | path: /yblr | permalink | Tags: , ,

Fri, 23 Dec 2005:

Managed to do too many things and screwed up everything ... Now I am stuck up shit creek without email.

+++ making chrome /tmp/thunderbird/mozilla/netwerk/resources  => ../../dist/bin/chrome/en-US.jar
error: file '../../toolkit/locales/en-US/chrome/necko/contents.rdf' doesn't exist at ../../config/make-jars.pl line 418.
gmake[4]: *** [libs] Error 2
gmake[4]: Leaving directory `/tmp/thunderbird/mozilla/netwerk/resources'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/tmp/thunderbird/mozilla/netwerk'
gmake[2]: *** [tier_9] Error 2

Screwing up - it's my gift, it's my curse...

posted at: 04:12 | path: /rants | permalink | Tags: , ,