Dailies for Wednesday 30 April 2008


Hardy Heron

I upgraded to the brand new version of Ubuntu, Hardy Heron, on Saturday. I didn’t upgrade in the usual sense – I actually took a backup of my data and did a complete reinstall. This seemed like a sensible decision, as it’s now three years since I installed Ubuntu, and my hard drive probably bore the evidence of my learning curve, much as a learner driver tends to cause a degree of damage to the clutch of the car that they learn to drive in.

Why I did a full reinstallation

There were a couple of other advantages to doing a complete reinstallation. Firstly, it allowed me to set up my partition table so that `/home` is stored on a separate partition. You can also do this with an existing installation, but it’s easier when you’re doing a fresh one because resizing partitions is quite slow, whereas deleting and recreating them is very quick. Having `/home` on a separate partition then makes it even easier to do complete reinstallations in the future.

Secondly, upgrading Ubuntu tends to take quite a few hours. If you have changed any configuration files (eg `smb.conf`) then you will be prompted whether you want to keep your version, discard all changes, or attempt to merge the two. However, these prompts come up while you are performing the upgrade, rather than all in one batch at the start or end, so you have to sit in front of the computer (or, at least, keep checking up on it) during the upgrade process. However, installing Ubuntu from scratch is remarkably fast. You download the ISO image (700MB), burn it to a CD, and then run the installation from that disc. The installation took about 15 minutes on my computer, and after filling in the initial configuration screens, the main portion of the installation program ran without needing my interference.

The downside

The downside to performing a complete reinstallation is that you lose all of your customisations. Application-specific settings are stored in your home folder, so those are easy to import. For most applications, I am taking this opportunity to start with a fresh profile – exceptions so far being Mozilla Thunderbird (with its hundreds of megabytes of archived mail) and Deluge, my Bit Torrent client (with all my RSS feeds). However, you will invariably lose system-wide settings.

But this isn’t necessarily a bad thing. When I first installed Ubuntu, I had to go through a number of hoops to enable the thumb-button on my mouse, and the multimedia keys on my keyboard. It seems that sometime in the last three years, this functionality was neatly integrated into the base distribution, and I discovered to my joy when reinstalling that it was all detected and configured in a totally fuss-free fashion. So instead of having all sorts of redundant hacks and tweaks to make my hardware work, it should now be handled in the simplest and most reliable way possible. It also gives me the opportunity to see how far things have come.

Configuration files

The only configuration file that I’ve had to modify has been `xorg.conf` (of course). For some reason, Ubuntu still can’t detect my 19″ Sony SDM-HS95P (I blame it on a poorly-supported video chipset) so it sets me up at 800×600. I expected nothing less, which is why I held onto a backup of my `xorg.conf` so that I could paste in the relevant lines. Maybe `displayconfig-gtk` could have done the job, but I didn’t bother to check. Incidentally, as far as I can see, there’s no way to run `displayconfig-gtk` from the Main Menu (unless you use the Menu Editor to make it visible in the “Other” submenu as “Screen and Graphics”).

Any trouble?

When I tried setting a static IP, the network connection disappeared altogether. This was fixed by manually restarting the networking daemon with `sudo /etc/init.d/networking restart` but I felt that this should have been done automatically.

I also found that trying to set a workgroup caused the `/etc/hosts` file to be broken in such a way that sudo would no longer work (I’d get the error `unable to resolve host`). Here’s a thread on that contains a solution, but for now I have just left the workgroup blank.


I have to admit, there aren’t any particular features in the new version of Ubuntu that I’ve been waiting for with baited breath (except perhaps Firefox 3), but I like to be using the latest and most well-supported version (assuming that it’s stable, of course). I also think that the new Wubi program (which allows you to install Ubuntu within your Windows partition) is an incredibly cool concept, though it doesn’t affect me personally.

Blogging Guidance TITGIG

Possible WordPress date formatting bug

As you have noticed, I do not display the time on my posts – just the date. However, anything published between midnight and 5am gets the words “in the small hours” appended to the datestamp, to indicate that even though it was technically posted on date D according to some atomic clock in a large city in Europe, it was posted on D-1 according to my internal daily rhythms.

To implement this, I use the function `get_the_time(‘G’)`. This should return a number between 0 and 23 which indicates the hour of the post’s timestamp. However, this stopped working, and it would actually return a very large number (of the order of about 1.1 billion) so the test failed. I don’t know whether this was caused by the upgrade to WordPress 2.5, or my recent move to a different server.

I managed to “fix” the problem by commenting out the following few lines near the top of `mysql2date` (defined in `wp-includes/functions.php`)

if( ‘G’ == $dateformatstring ) {
return gmmktime(
(int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ),
(int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 )

However, this is not the ideal solution. Firstly, it’s hard to know if this change is causing a breakage elsewhere in the system (where the code relies upon this apparent bug). Secondly, when I upgrade to a new version of WordPress, I have to remember to fix the new `functions.php`

I discovered a better solution to the problem. I put `functions.php` back to its original state, and then replaced my calls to `get_the_time(‘G’)` with `get_the_time(‘G ‘)` – note the added space. `$dateformatstring != ‘G’` but the function returns the desired result. Get in.

I would report this on the WordPress support forums but I can’t be bothered to create an account.

*Update: I’ve discovered that the offending block of code was added for WordPress 2.5 to address this issue.*

Computing Displeasure


If my bank were to check the access logs of their online banking site, they’d discover a few requests every day with the following user agent:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv: Gecko/20071127 Firefox/ (actually 3.0b5 but a certain banking site won't let me in unless I lie about it)

Someone should tell them that trying to block people using user agent sniffing is about as futile as trying to reduce the teenage pregnancy rate by means of abstinence-only education.


Sceptic tank

sceptic tank


This image is licensed under Creative Commons by-sa 2.0, as is the original source image.


How to choose the right cover versions

Cover versions serve two main purposes for a fledgling band. Firstly, a new band may only have four original songs. But add on a few covers, and all of a sudden they have enough material to fill a 45 minute slot. Secondly, they assist in maintaining the attention of an audience who are probably totally unfamiliar with your original material. Here are a few guidelines to choosing the perfect cover versions. They’re only guidelines, so there are exceptions, but if you do break them, you need to be able to justify your decision.


Choose a song that your audience will know.

As I said above, one of the main reasons why a band would play a cover version is to maintain the attention of the audience. If you play a song that they don’t know, then you gain absolutely no benefit. In fact, you’ll be making life unnecessarily hard for yourself. It’s relatively easy to draw a positive response from an audience member if you play a song that they know. It’s harder to draw a positive response if you play them one of your own songs that they haven’t heard before. But if you play them a song that they haven’t heard before, and it isn’t even one of your own original compositions, then they’ll have practically zero incentive to listen.

When to break this rule: If you love a song so very very much, and you can play it exceptionally well, then you might want to do a cover version of it anyway. This is, in effect, saying to your audience “I love this song, it’s amazing, you absolutely have to hear it.” But your performance has to be outstanding for this to work. If you’ve only been playing guitar for six months and you attempt this move, then there’s a 90% chance that you’re making a big mistake.


Choose a song that hasn’t been “covered to death”.

When was the last time that you heard a group of four pimply teenagers play Creep and found the experience to be wholly transcendental? When was the last time that you heard a group of middle-aged men play Yesterday and thought anything other than “Oh great, this one again.”

You should be aiming to select songs that are well-known, but have somehow been overlooked for covering. You want your audience’s response to be “this is a fantastic song, how come I’ve never heard anyone do a cover version of it before?” If you can elicit that response, you’re guaranteed success, even if the quality of your performance is modest.

When to break this rule: There are three clear circumstances: If you know your audience, and you know that they will accept it; if you know that your performance is exceptionally good, and this will be the greatest cover version of song X that your audience has ever heard; if you are doing “something substantially different” with the song.


If you can’t play it, then don’t try to play it.

It’s 24 hours until the gig, and the song still sounds crap. Don’t try to convince yourself that it will be alright on the night, because it won’t. It will be even worse on the night. When you look back on a gig, the most vivid memories are always the songs that you shouldn’t have played. If you ask me really nicely, I’ll upload an MP3 of my band’s cover of Neighbourhood by Space, and you’ll see what I mean. Every time I think of that gig, the first thing that comes into my mind is that song.

When to break this rule: There’s no excuse for breaking this rule. If you’re worried about your set being 4 minutes too short, then just spend a little bit of time chatting with the audience. They’ll appreciate it. If you’re too shy to talk, then just leave the stage 4 minutes early. I assure you, it’s much, much better than the alternative.

Entertainment value

Choose a song that will entertain you and your audience.

If the song is long and repetitive, then your audience will probably get bored. If you don’t enjoy playing it, then your performance will be lacklustre. Don’t settle for a second-rate song just because you know how to play it. Remember, these cover versions are here to help you to keep the audience alive. Make them count.

When to break this rule: If the song is so good that even a half-assed effort can’t ruin it. No examples spring to mind, but it’s not beyond the realms of possibility that they exist.

It’s about the song

Avoid the “hey, aren’t we ironic” cover version.

At my second gig, we did a cover version of Wannabe by The Spice Girls. This was a big mistake.

For the first 30 seconds, the audience might get the joke, and might chuckle. But then you’re stranded there on stage and you have to finish the song. It’s quite embarrassing.

When to break this rule: I’ve successfully broken this rule once before, but I’m not going to tell you about it. For now, just take this one as gospel.

It’s about the music

Consider how the song sounds when the vocals are inaudible. Added 2008-04-22

As a fledgling band, you’re going to be playing gigs in venues with terrible acoustics, useless sound engineers, and heaps of background chatter. To your audience, the vocals will be unclear and indistinct. It will sound not unlike the lead vocalist is humming the melody. So try that. Practise the song, but instead of singing the lead vocals, just hum the melody. What does the song sound like now? The same four chords repeated over and over again for four and a half minutes? That’s what your audience will hear. Maybe you should drop that song from your repertoire.

When to break this rule: When the song is so well-known and singalongable that the audience are going to be drowning you out anyway. Or if you can be absolutely certain that the vocals will be audible (ie if you have played a gig at a certain venue with a certain sound engineer and your friends in the crowd told you afterwards that they could make out the vocals clearly on every song, then it’s a decent bet that you’ll get similar results on a subsequent occasion).

When to break all of these rules

When you’re just starting out. Your repertoire is limited, and you have to do what you must. But as time goes by, you should aim to replace your weak cover versions with stronger ones. Right now, you have a valid excuse, but it doesn’t last for long, so don’t get complacent. Your band won’t fulfil its potential until you’ve ditched the deadweight.

What about recording?

Putting cover versions on your album or demo CD is generally a bad idea. “Filler” is bad enough when it’s original material, but when it’s someone else’s song, it’s bordering on the criminal.

When to break this rule: If you feel that your version is better than the original, or significantly different, then by all means, show it off. Here’s a list of good examples.

Gardening Photos

Bifurcated Strelitzia

Bifurcated Strelitzia

My Strelitzia seems to have bifurcated this year. I dunno, maybe this is actually a really common occurence, but it took me by surprise.

Gaming Parenting


Bernard has now spent the past six nights in a bed. Well, with the exception of the time that he’s spent on the floor next to his bed, or on one occasion, underneath his bed.

He seems to be much happier without bars. When he wakes in the morning, he doesn’t have to wail at ever-increasing volume until someone comes to rescue him. Instead, he can just slide out of bed and waddle around upstairs to his heart’s content.

A consequence of this change is that the POÄNG has been returned to the sitting room, and a bean bag moved upstairs to replace it. The POÄNG is a most adequate gaming chair, and certainly beats sitting cross-legged on the floor in front of the television. Ironically, on Sunday I completed Tomb Raider Anniversary ((which I’ve been playing since mid-January)) and so now I have a lovely gaming chair, but no games to play while sitting in it.

On an unrelated note, you see that “YOU ARE HERE” thing at the top-left of the page? What are your thoughts on the usefulness of that? Many thanks.

  • “Theme Test Drive WordPress plugin allows you to safely test drive any theme on your blog as administrator, while visitors still use the default one.” This is also useful for doing a “live redesign” of your blog site without anyone noticing. I eventually dropped this plugin in favour of the Theme Switcher plugin, which allowed me to show the new theme to specific people by sending them the super secret link.