Integrating Bloglines and del.icio.us #

Want to easily post things you read in Bloglines to del.icio.us? Follow these steps:

  • If you haven't already, install the excellent greasemonkey Firefox extension.
  • Open up this user script (in Firefox).
  • From the "Tools" menu, select "Install User Script.." and confirm all of the various prompts
  • Go to your Bloglines account.
  • Observe that all "Clip/Blog this" links at the bottom of each entry have been changed to "Post to del.icio.us."
  • Click on one to post that item to del.icio.us (you will be prompted for your username the first time you do this).

As an added bonus, the script makes the "Extras" section in the sidebar toggleable, so that it doesn't always take up so much room. This is all done in a very straightforward manner using DOM operations. It is possible that things could be made more elegant with some XPath-Fu. Things may stop working if Bloglines alters their markup significantly.

I would like to integrate the two services even further, but I'm not sure how much more can be done. Ideally each item in Bloglines would have the tags you've assigned it and perhaps the top N community tags as well. However, given the limitations imposed by the JavaScript security model, I'm not sure how to talk to del.icio.us directly, since the scripts will execute within the Bloglines context. In any case, this JavaScript del.icio.us API looks promising.

XmlSerializer and JavaScript #

At work I've been digging around the WebCore code base, trying to see how Safari supports (or more correctly, doesn't support) XML-related things. I happened to notice a XMLSerializer class that I hadn't heard of before. A bit more digging turned up that Mozilla implements it and Opera 8 will too, thus it is a de facto standard of sorts.

Safari's implementation seems rather limited, with the only method that it supports being serializeToString. Furthermore, it only accepts complete DOM documents. However, it may still be useful in certain circumstances. For example, click here to view the serialized version of my RSS feed. To code to do this is:

function serializeRSS() {
  var request = new XMLHttpRequest();

  request.open("GET", "/index.xml", false);
  request.send(null);

  var serializer = new XMLSerializer();
  alert(serializer.serializeToString(request.responseXML));
}

The best part about the above code snippet is that it's very straightforward and natural-looking. No IFRAME tricks required. No need for regexp-based parsing. Although browser-based development still has a ways to go, I'm glad it's headed in the right direction.

Thefacebook Adoption Rates #

Thefacebook reached my school in the second semester of my senior year. Although I haphazardly copied over my Orkut profile and added a bunch of friends, I never really got into it, having more pressing things to occupy my time.

However, noticing the steady stream of friend requests from people in younger classes, I was curious to see where it stood now. I was initially surprised by how many people in my year (2004) got around to signing up (perhaps they hadn't suffered social networking exhaustion like me). More shocking were the numbers that I saw when looking at the classes still enrolled in school. The class of 2008 has 84% of its members on Thefacebook, which is amazing when considering that this is a third party service with no endorsement whatsoever from the school. With such reach, I can see why some people get excited about the field.