talideon.com

I don’t mind kissin’ but I hate that...

Entries for May 2007

May 1, 2007 at 10:16AM Fixing Firebug’s chrome under FreeBSD

I’ve had one longstanding problem with Firebug’s chrome rendering under FreeBSD, specifically that it doesn’t render half of it. I kid you not: whereas on Linux I get nice shiny red buttons, shiny tabs, subtle gradients, and so on, under FreeBSD I get none of it. It’s still usable, but some of the buttons, like the hide/reveal console button, end up well hidden.

I cracked last night and decided to investigate what was going on. I checked the ‘platform’ directory first as that holds platform-specific files:

$ cd ~/.mozilla/firefox/ws8ra29n.default/
$ ls extensions/firebug@software.joehewitt.com/platform/
Darwin  Linux  linux-gnu  WINNT

[In case you’re wondering, I’m pulling those paths off the Ubuntu box I use at work, not my FreeBSD box. YMMV.]

Right... I made a copy of the ‘Linux’ directory called ‘FreeBSD’ (though the ‘linux-gnu’ and ‘WINNT’ directories would have worked just fine), restarted Firefox, and magically it was displaying the correct chrome. Problem solved.

But I didn’t stop there. I was still a little left feeling a bit uncomfortable by the fact that I’d expected some kind of fallbacks to be in place for people such as myself who weren’t running one of the platforms listed in the platform directory. Unfortunately there was nothing, not a sausage anywhere, to cope with situations where there it’s running under a platform not listed under ‘platform’. I poke around the code revealed no workarounds in the code, so I submitted a bug to the Firebug bugtracker. We’re not talking about a high priority bug here or anything, but it is something of a major annoyance.

Update (June 4th): Hurray! It seems this this going to be fixed in an upcoming release: see issue 160, where I reported the problem and issue 182, where the fix is specified and not too far off my own naive suggested fix.

May 2, 2007 at 3:02PM strtotime(), or why American date formats are retarded

Americans: I’d swear they go out of their way to be awkward.

The particular bit of awkwardness that bit me was PHP’s strtotime(). It’s quite useful but in one regard it’s a bit dumb: it doesn’t seem to bother checking what the current locale is.

Where this is a problem is when you’re typing in dates like 1/12/1979. Now kids, is that December 1st or January 12th? As far as strtotime() is concerned, it’s January 12th, which is fine if you’re American, but for the rest of the English speaking world who also use slashes as date field separators, December 1st. Something of an inconvenience, eh? If you want to get the behaviour the rest of the world uses, you need to use hyphens instead. Aaarrgh!

[Of course, I patched around this with a quick str_replace() to replace any slashes with hyphens. It’s a hack, but at least now it works consistently.]

May 8, 2007 at 11:12AM Spiderman 3 is a steaming heap of shite

I’m neither kidding nor exaggerating. Avoid like the plague. Proper review coming tomorrow.

May 14, 2007 at 2:17PM Fujiya & Miyagi: Ankle Injuries

Top song, top band.

[via]

BTW, if you want to embed this in your own blog, don’t use the HTML the player provides. Instead, view the source of this page and search for <object. The (X)HTML used here is actually valid, cross-platform, and smaller.