click here for my current blog

this blog is no longer maintained and is here only for archival purposes

Archive for April, 2008

Facebook Chat

Thursday, April 24th, 2008

Facebook’s new Chat feature certainly took me by surprise, but after a few minutes of using it I realised this was the smartest thing they could have done. It gives the whole “Facebook Platform” a new sense of immediacy, thus enhancing more or less every aspect of the site by adding the element of interactivity. (Eg, you can make a “witty” comment on a friend’s photo and immediately get an irate response from them.) At the very least, it’s caused me to spend more time looking at Facebook pages in the last couple of days than I had in the last month combined. I’m interested to see where this takes them, and if it can rejuvenate the platform whose user-base seemed to be suffering Facebook-burnout.

Social aspects aside, the technical implementation is rather clever. The one thing that made me go “buh?!” was the apparent persistency of chats across multiple windows. They make it seem like they are somehow able to preserve state between pages, but after some delving I found that they achieve the effect through some neat tricks.

When you open a Facebook page, your chat’s “state” is sent along with the main page data. They then make an GET XMLHTTPRequest to a specially-configured HTTP server. This is accepted, but the server delays its response until it has something to send (ie if there’s some change in state, like a message, or a user going on/offline). If nothing happens before the request times out, then another request is made. This effectively establishes a channel through with the server can “push” content at the user. I presume this is the same way that GTalk, MSN Web Messenger, and other similar web apps do this – although I’ve not personally investigated them.

As to persistence: If multiple browser windows are making GET requests to the same URLs, the browser’s internals will only make a single connection and serve the resultant content to all of the requesting windows. (the same way it would only download an image once that appears on several pages) When you send a message from one of your open windows, any others are then notified via the established “push channel” (not sure what the correct name for this is), keeping them in sync. If things go awry (connection issues, etc) an instance can POST to ‘history.php’ to refresh its state. This cleanly avoids out-of-sync issues that could conceivably plague such a system.

This all gives the illusion of a persistent chat application that spans multiple windows, and so far it seems to be pretty fault tolerant. Colour me impressed. It will be interesting to see if and how they decide to open this new feature up to developers via their API, although I’m fairly certain it won’t compel me to install any new Facebook apps in the near future.

Update: It happens that this technique has a name: see “Comet” at Ajaxian.

Facebook Fresh™

Monday, April 7th, 2008

I’m actually working on a new version of Facebook Fresh, the award winning* GreaseMonkey script that magically removes all your friends’ annoying Facebook applications. In the meantime, you can still get the old one here. (will not work unless you have GreaseMonkey, which is an extension for Firefox, installed)

(*Did not win any actual awards. Yet.)

BarCamp Sydney 3 Day Two

Monday, April 7th, 2008

So, BarCamp Sydney 3 is over. I attended yesterday, but left in the early afternoon after feeling decidedly “camped out”. Maybe it was the free beer and pub meal the night before, or maybe the free pizza at lunch yesterday sent me into a food coma. Either way, I found I had lost the energy to continue in any productive fashion.

In the morning I did, however, show lft’s Craft, an amazing demo written for a 20mhz microcontroller. (I insist you check it out, if you haven’t seen it already.) The reaction was really positive, despite my initial uncertainty that people would actually get why it is so amazing.

Overall, my BarCamp experience was great. I really enjoyed presenting and interrupting people contributing to some really interesting discussions. What I liked most of all, though, was meeting so many interesting and enthusiastic people. I thought that maybe 2 full days was a little much for me, but perhaps next year there will be more attendees that will justify the extended time.

Thanks to all the unorganisers, who worked tirelessly to make everything ran smoothly. Well done.

BarCamp Sydney 3 Day One

Saturday, April 5th, 2008

Day one is over, and it was a lot of fun. I gave my presentation and it went really well. There were a few people who commented on having enjoyed it, and at least one or two who will definitely go on to play with Processing. Mission accomplished.

The other presentations were mostly very interesting. One that sparked particular debate was on “web 3.0″, and whatever that’s supposed to mean. I really enjoyed the format of the conference: interruptions are not just permitted, they are encouraged. You can see a photo of me making some sort of important point on Flickr (plus a couple of other embarrassing shots).

During the day a couple of guys and I set up a “Rick Roll” presentation, which was exactly what you would imagine. Surprisingly at least 20 or so people came, I still have no idea why. I think a lot of this Rick Rolling business is just a cover-up for the fact that people seem to just like the song.