YSlow is a Firefox extension that works with Firebug to grade your web pages’ performance and gives you advice on how to fix any problems. Awesome. It has JSLint built into it too. And yes I got a big freaking F. Via Arun (IRL). (3)

MySQL command line “secret”

Tom Preston-Werner (of Gravatar and Chronic fame) wrote about this neat MySQL command line “trick” where instead of ending your SELECT statements with the usual semi-colon, using a “\G” gives you a very readable output.

mysql> select * from locations where location_code = 'SIN'  limit 1\G
*************************** 1. row ***************************
          location_code: SIN
          location_name: Singapore Changi Apt
multi_airport_city_code: SIN
          location_type: A
      location_sub_type: A
           country_code: SG
             state_code:
                 active: 1
               latitude: 01.22.00N
              longitude: 103.59.00E
1 row in set (0.10 sec)

Very useful, especially when SELECTing multiple fields where the output becomes unfit for visual consumption (you know what I mean, just go SELECT some stuff in your MySQL command line and you’ll see if you don’t).

Firefox “ad” in the Singapore MRT

I saw a familiar furry animal on one of the ads near the entrance of City Hall MRT and did a double take when I realized it was actually a firefox! I had no real choice but to snap a grainy photo and post it here.

Firefox in an MRT ad!


Well, the ad actually labelled it as a “Red Panda“, but we all know that red pandas are also called firefoxes.

Google Reader - a Bloglines user’s perspective

With the recent update of Google Reader, Google’s shot at an online feed reader, I just had to try it out even though I was rather contented with Bloglines. I’ve been a long-time Bloglines user (since end 2003 I think), and even though there was little in terms of innovation and useful new features happening, Bloglines was, in my opinion, ahead of its time way back in end 2003, and it provided an unchanging interface that worked (well, my opinion on that changed after using Google Reader, as we will soon find out).

Google Reader interface


So, I took some time to clear the backlog of unread articles in my 289 feed subscriptions at Bloglines recently so I can “start over” at Google Reader and not have to read the same unread articles twice. Export Bloglines to OPML, import into Google Reader… It went painlessly and I noticed that Bloglines “folders” got converted into “Tags” in Google Reader - mmm, taaaags. But oh wait, what’s this when I try to “manage my subscriptions” - tags, folders and labels. I’m getting confused.

Google Reader - tags, folders and labels


Just to make sure that they really are the same thing, I created some test tags/labels/folders, and yes they are actually the same thing (meaning if you add a new folder, it becomes available as a label and tag). I’m sure the terms used will be made consistent as Google Reader moves out of beta (or rather, gets further along as a beta).

If you noticed how unorganized my Bloglines subscriptions are, that’s because organizing feeds was a pain on Bloglines back in the day (it was clumsy to organize feeds into folders, you had to select a feed, scroll to the dropdown, and select the action to move it into a folder), but that’s not really a problem now with the new drag and drop interface for managing subscriptions that Bloglines pushed out recently (I think). Thankfully, Google Reader makes managing subscriptions easy as well with the familiar Gmail-like labeling.

Anyhoo, I started using Google Reader for a bit to read new articles in my feeds, and it wasn’t long before I just found my killer feature: ‘mark items as read when you scroll past them’.

Google Reader's 'mark items as read when you scroll past them' preference


This preference will tell Google Reader to only mark those items you have scrolled across as read. I hated it in Bloglines where clicking on a feed would mark all its articles as read, especially for those prolific blogs or those for which I have a backlog (200 entries is usually a little too much for one sitting for good blogs). I have to say it again, this is the killer functionality for me. I’ve been bitten by interruptions and crashed browsers once too many times. I always click on feeds (in Bloglines) with more than 50 unread articles with no small amount of trepidation, fearing that I won’t be able to read them all or that I’d do something to crash Firefox (which is surprisingly common when you’re working with large datasets in JavaScript). This often results in my reluctance to click on feeds with more than 50 unread posts, and with the vicious cycle 50 becomes 200 (the Bloglines limit for unread posts) and the feed rarely gets read (happens with blogs like Scoble or news websites like The Register).

With this feature in Google Reader, I can click on “All items” even if it says there are 1 gazillion unread posts and still feel safe about not losing my place. Those of you using non-web feed reader applications may scoff at this (I’m really not sure, I haven’t used one in a long time so I only assume something like this is common in applications like NetNewsWire or FeedDemon), but I’ve yet to see this done in a web application. Offline feed readers are not really an option for me unless they integrate to an online (i.e central) source (let me know if one exists!). For this feature alone, I decided to make a switch to Google Reader from Bloglines.

Google Reader can get a little slow though, but then I only have 512MB of RAM right now so it probably isn’t indicative of anything (the new Bloglines is slow on the Macbook Pro as well I noticed). Hopefully all this will be moot when I get the 2GB RAM upgrade that’s waiting at the store. Other than that, Google Reader seems faster to respond network-wise (which I’m not surprised at, considering that it’s Google (and their distribution channels)), and it’s also prettier. Yeah, looking good matters to some people, like me (not that Google Reader is fantastic aesthetically, but it’s far less staid than Bloglines).

Now all that’s left is to keep those fingers crossed for some sexy Gmail integration - I’m thinking something like RssFwd, a wonderfully useful creation by Choon Keat. I use RssFwd to track some important blogs and to track the latest releases of TV show torrents (Choon Keat is not gonna be happy about that though heh).

Extract Any Archive with Ruby, Slimtimer, Feedalizer

A bunch of cool stuff I found over the weekend that didn’t individually deserve a blog post, but I thought would be worth sharing.

Extract Any Archive with Ruby

This is really neat if you could never remember what commands or command-line arguments you need to extracting archives (.zip, .tar.gz, .tar.bz2 - those kinds of archives).

With this Extract Any Archive script written in Ruby, instead of

tar jxvf DonkeyPr0n.tar.bz2

you can simply do

e DonkeyPr0n.tar.bz2

Instant gratification!

Slim Timer

SlimTimer is one another of those productivity-keep-track-of-your-todo-list type applications - I like it because seeing the time ticking away gets you motivated on sticking to the task at hand. You can stick it into your Firefox sidebar and all that AJAX-y stuff makes it behave like a normal application.

SlimTimer running in a Firefox Web panel


Feedalizer - transform web pages into RSS feeds

Choon Keat pointed this out to me recently: Feedalizer (backed by Hpricot). I played around with it and it was so easy (and fun) to use. Whipped up a Mongrel news feed (code) for Mongrel news (which didn’t have an RSS feed). The hardest part was figuring out which Hpricot methods to use to parse the bits I needed.

Served by Apache 2.2, mod_proxy_balancer, and Mongrel

I got off my butt and set up Apache 2.2 with mod_proxy_balancer to load-balance a cluster of Mongrel processes, if you’re still seeing this, that means it hasn’t crashed, yet :p. Just kidding heh - I’m finding this setup pretty stable, though there was once the mongrel processes seem to have been over-loaded with requests (with 96MB RAM I can only run 2 processes, and even then I run out of memory real fast due to automated comment spam - does anyone have any solutions to blocking automated comment spammers before they even hit your website?).

In any case, I learnt quite a bit as I was setting up my deployment environment for Rails, and hopefully someone will be able to benefit from that when I finish my post on the topic.