When I die, think only this of me: Blimey, this is difficult!

The tradition of observing a minute’s silence to commemorate the personal sacrifice of military personnel in past battles has undergone a certain evolution through time, transforming into the preferred method of marking the passing of any figure of public note. This is most noticeable in sports arenas, where the entire crowd is asked to remember the person in question for a minute prior to the day’s match. This is an excellent approach: the ceremony, brief and relatively informal though it is, can be held in focus by those who feel most affected. (Note that I use the phrase ‘most affected’ to differentiate the sports fans from the general population as a whole; the fans’ feelings can in no way match those of the departed’s friends and family.)

In recent years, the minute’s silence at sports grounds has been replaced by the minute’s applause. Whether it’s thought that using the universal sound of appreciation is more appropriate to sporting and entertainment figures than the more sombre requirements of people killed in battle, or whether it’s to cover for the fact that a reasonable proportion of football fans are unable to focus on anything for a full minute (or at least stand still for that length of time) is unclear, but it certainly seems more fitting in its context.

I’ve been thinking about all this since listening to a program on commemorating the war dead on Radio 4 this morning, and wondering how I’d like my passing to be commemorated. I am reminded of the example of Jeremy Hardy, who once said:

“I would quite like to die in a way that causes maximum inconvenience to others – on an escalator, or while having my blood pressure taken. Or at somebody else’s funeral. Attention-seeking to the last.”

As a comedian, it’s understandable that Jeremy wants to get as much attention as possible, and it will certainly cause a few people to remember his passing. For myself, I prefer to cause as little consternation amongst large groups of people as I can, so lasting remembrance is unlikely to come my way through this route.

I believe I fit into that category of people who will never amount to much on the world stage, and will pass on with no corresponding outpouring of public emotion. However, should a large group of people feel that I’m worthy of being commemorated in a public act, I will at least want people to remember that. So neither a minute’s silence for me, nor a minute’s applause. I want a minute’s hopping on the spot. It would look ridiculous and unseemly, and most would fail in the attempt, but the thought amuses me and it should (if done properly) amuse everyone who’s trying to hop too. You may not wish to hop, and that’s your right, and I won’t be upset (I’ll be rotting). But you should be amused, and if you’re not I don’t want you commemorating me at all, you miserable sod.

March 9, 2010   Posted in: Ramblings  No Comments

Gnomine Icon

Gnomine Icon
A new icon for Gnomine, the GNOME Minsweeper clone. You can download it from the Icons page.

February 6, 2010   Posted in: Icons  No Comments

Your backup strategy

Yes, there’s approximately 8,390,000 articles on this subject already, but it seems that people still don’t get it. In the vain hope of 8,390,001 articles doing the job instead, here goes:

BACK. UP. YOUR. FRICKIN’. DATA. If you don’t, you’ve got no-one to blame but yourself when it all goes Pete Tong and you lose it.

There are numerous strategies for this, but here’s mine:

First, buy two external hard drives. Yes, two. Keeping one backup next to your computer is a waste of time. When the nasty burglars sneak in, or fire monster comes calling, you’ll lose the backup with the computer, which kind of defeats the point. So, buy two external drives, and keep one outside the house – at the office, with a friend, wherever. But I precede myself.

When your backup drives arrive, take a moment to enjoy the shiny wrapping. It’s always worth treasuring new stuff, however mundane the item.

Plug in your first drive, and back up the data you need (a word on how to do this in a moment). I don’t back up my whole hard drive, as I’m happy enough to reinstall stuff from scratch if I need to. I just back up my documents, photos, movies and that kind of thing – the stuff I can’t get from anywhere else, or would take too much time to find again. If you want to protect your entire hard drive, and copy absolutely everything, that’s fine too. Once the backup is complete, repeat the backup for the second drive.

You now have two backups of your data. Good. Take one of the hard drives away from the house, and leave it somewhere safe. This is your off-site backup, and will be handy if the fire, burglars, or burglars on fire come and destroy your home. Keep the other drive at home, and every few days, update the backup. This is your short-term fallback in case your computer dies, or you accidentally delete an important file.

Over time, your off-site backup will obviously become out of date, and be less and less useful. So every few weeks, swap the two backup drives. This way, if the worst comes to the worst, you won’t lose too much stuff. There’s a trade-off here between convenience and the security of your data, so come to a compromise to suit your circumstances. Never, let your off-site backup languish in a drawer for 6 months though – an out of date backup is almost as useless as none at all.

When it comes to backup software, there’s plenty of options out there that will do the job. Some specialise in copying entire hard drives if that’s your bag, and others are better at dealing with selected sets of files. As a massive geek, I only ever use the Linux rsync tool, so I can’t comment on any specific software package. There’s more options, reviews and opinions in the world than you’ll ever need, so find something that works for you. The real key is to find something that will make your backing up as simple as possible – the harder it is, the less likely you are to bother doing it. And that way lies disaster.

That’s it. Simple. Now go and do it, unless your data is worthless to you, and I doubt that very much.

February 4, 2010   Posted in: Computing  No Comments

Unfair parking fines and strange coins

A bunch of us arrived for Frisbee training by bicycle, and parked up in the local pay and display car park near John Bunyan’s cottage, next to the local pub (strangely not the John Bunyan). We chained our bikes along the fence to keep out of everyone’s way. For some reason, all but two of us bought car park tickets and attached them to the bikes – I and one other didn’t, as it didn’t really seem necessary.

Just as we were heading to the pitches, the parking attendant arrived and began writing up fines for the two bikes that weren’t displaying tickets. I quickly tried to buy a ticket from the machine before my fine was completed, but failed. However, in trying to extract my ticket, the machine spat out a load of coins, which I pocketed. Having failed to prevent my fine being issued, I went to training.

On our return, we inspected the tickets we’d been given. I had a £50 fine for failing to display a valid parking ticket. The other non-ticket-holder had the same fine, plus and extra £100 fine for having his vehicle facing the wrong way. Since this isn’t an offence, and in any case a bike could be picked up and turned around by hand, we were understandably livid. Closer inspection also revealed that the parking attendant was getting kickbacks from the pub – in lieu of a discount for early payment, the fines would be waived if we agreed to spend at least 50% of the fine amount on food therein.

Back at my parents’ house some time later, I looked at the selection of coins I’d received from the parking machine. They included:

  • Two copper fifty pence pieces from 1941, with very sharp corners.
  • One two pence piece from 1870, depicting an incredibly fat, almost spherical Queen Victoria.
  • One wildly impractical ‘coin’, a rectangle measuring some 6 inches by 4 inches, commemorating the feats of a famous quarterback in the NFL. The value of this coin was $14.

At this point I remembered how utterly furious I was with the unfair parking fines, and woke up in a bad mood.

February 3, 2010   Posted in: Dreams  No Comments

R, the acf function and statistical significance

The R language provides us with a useful method to calculate the autocorrelation function (ACF) of a time series. An example of an environmental time series with a seasonal cycle is shown below, with the resulting plot:

corr <- acf(series, lag.max=288,type="correlation",plot=TRUE,na.action=na.pass)

(My data set has some missing values, hence the na.action=na.pass parameter.)

Plot from R's acf function

The output of the acf function (click to enlarge)

As well as the calculated ACF, we can see two blue dashed lines across the plot. These lines indicate the point of statistical significance - values between these lines and zero are not statistically significant, while those above and below the lines (towards one and minus one) are significant.

In some cases, it would be useful to know what this value is, so we can determine whether individual values from the ACF are significant or not. Unfortunately, the output of R's acf function doesn't make it available to us.

A hunt through the source code of the acf function gives us the information we need. We can calculate the significance level as follows:

corr <- acf(series, lag.max=288,type="correlation",plot=TRUE,na.action=na.pass)
significance_level <- qnorm((1 + 0.95)/2)/sqrt(corr$n.used)

The 0.95 parameter indicates that we calculate the correlation at which values are significant to the 95% level - you can change this as you see fit.

Note that the significance is a function of the number of data points you have - the more points, the closer to zero the significance level will be, and the more confidence you can have in your ACF.

January 20, 2010   Posted in: R  No Comments

Updated Songbird Icon

Songbirdi icon
The Songbird icon has been updated with the newest, none-more-black version of the application icon (from Songbird 1.4.1). You can download it from the Icons page.

Update 03/03/2010: Fixed the download link.

January 9, 2010   Posted in: Icons  No Comments

DVDs that won’t play in Linux, and how to make them behave

People Like Us DVD

People Like Us. Except when we can't see them.


Playing DVDs in Linux is generally a pretty painless process. The libdvdcss library does a sterling job of allowing us to watch our DVDs on legitimate hardware using the operating system of our choice, legal machinations notwithstanding. It also manages to circumvent the region encoding of the DVD (an abitrary and legally dubious restriction), allowing you to play DVDs from any region in your player without intervention. At least, most of the time it does; there are a few DVDs in the wild that libdvdcss can’t access unless the drive is set to the correct region.

I came across one example of this recently, when I bought People Like Us Season 2. It seems that this was only ever released in Australia, and as such is a region 4 disc. I’m in the UK, and so have (I assumed – more on this shortly) a region 2 DVD drive in my machine. Most of the time this isn’t a problem – I have DVDs from most regions in my collection, and so far they’ve all played just fine. This one, however, wouldn’t play ball. When I tried to play the DVD, mplayer took ten minutes to do anything, and then it couldn’t play all the tracks. A quick look at the libdvdread activity revealed the problem:

libdvdread: Using libdvdcss version 1.2.10 for DVD access
There are 8 titles on this DVD.
There are 1 angles in this DVD title.

libdvdread: Attempting to retrieve all CSS keys
libdvdread: This can take a _long_ time, please be patient

libdvdread: Get key for /VIDEO_TS/VIDEO_TS.VOB at 0x00000152
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_0.VOB at 0x000001c2
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x0000ac4a
libdvdread: Elapsed time 1
libdvdread: Get key for /VIDEO_TS/VTS_02_0.VOB at 0x0000dd3b
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x0000dd92
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_0.VOB at 0x0000f04c
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_1.VOB at 0x0000f0a3
libdvdread: Elapsed time 46
libdvdread: Get key for /VIDEO_TS/VTS_04_0.VOB at 0x000a7da2
libdvdread: Elapsed time 1
libdvdread: Get key for /VIDEO_TS/VTS_04_1.VOB at 0x000a7df9
libdvdread: Error cracking CSS key for /VIDEO_TS/VTS_04_1.VOB (0x000a7df9)!!
libdvdread: Elapsed time 303
libdvdread: Get key for /VIDEO_TS/VTS_05_0.VOB at 0x001416de
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_05_1.VOB at 0x00141735
libdvdread: Error cracking CSS key for /VIDEO_TS/VTS_05_1.VOB (0x00141735)!!
libdvdread: Elapsed time 249
libdvdread: Get key for /VIDEO_TS/VTS_06_0.VOB at 0x001d8a51
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_06_1.VOB at 0x001d8aa8
libdvdread: Error cracking CSS key for /VIDEO_TS/VTS_06_1.VOB (0x001d8aa8)!!
libdvdread: Elapsed time 259
libdvdread: Get key for /VIDEO_TS/VTS_07_0.VOB at 0x002754ed
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_07_1.VOB at 0x00275544
libdvdread: Elapsed time 18
libdvdread: Get key for /VIDEO_TS/VTS_08_0.VOB at 0x0030a0a4
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_08_1.VOB at 0x0030a0fb
libdvdread: Elapsed time 1
libdvdread: Found 8 VTS's
libdvdread: Elapsed time 878

The CSS tracks for three of the titles on the disc couldn’t be extracted, and those titles wouldn’t play. This left me with a problem – a DVD that I couldn’t watch. Since I knew that I could watch all my other DVDs, I set about finding out how to change my DVD drive to region 4; I could then play my new Australian DVD, and still be able to play my current collection. This is important – most drives will only allow you to change the region a set number of times (usually five), so I couldn’t afford to keep chopping and changing the region.

The Linux utility regionset (available in the Universe repository in Ubuntu) allows you to view and change the region code of your DVD drive. Having installed regionset, I ran to it change my region:

$ regionset
regionset version 0.1 -- reads/sets region code on DVD drives
Current Region Code settings:
RPC Phase: II
type: NONE
vendor resets available: 4
user controlled changes resets available: 5
drive plays discs from region(s):, mask=0xFF

Would you like to change the region setting of your drive? [y/n]:

This is an interesting result – it seems that my DVD drive had no region set at all. I would have thought a drive sold in the UK would be pre-set to region 2, but perhaps the region is left to be set the first time you play a DVD. Who knows? For our purposes, it doesn’t matter. I decided that I would like to change my DVD’s region:

Would you like to change the region setting of your drive? [y/n]:y
Enter the new region number for your drive [1..8]:4

Once I’d entered that, my DVD region was changed:

$ regionset
regionset version 0.1 -- reads/sets region code on DVD drives
Current Region Code settings:
RPC Phase: II
type: SET
vendor resets available: 4
user controlled changes resets available: 3
drive plays discs from region(s): 4, mask=0xF7

So I now have an Australian DVD drive, which can play my Australian DVD. (My reset count has dropped by two because of my inability to type the number 4 on the first attempt.) I tried a few of my DVDs from other regions, and they still played just fine, so all is well. Or is it? As well as my main desktop machine, I sometimes watch DVDs on my laptop, as well as my work laptop when I’m travelling. Do I have to go through all this to play People Like Us on those machines too?

From previous encounters with libdvdcss, I knew that it kept its decrypted DVD keys cached in my home directory, ~/.dvdcss. I wondered if I could simply copy the cached key for the People Like Us DVD onto my other machines. I had a look in the cache directory, and found the sub-directory for People Like Us. Luckily, most DVDs are easily identifiable:

...
MY_NAME_IS_EARL_S1_DISC_4-2006090710551600-1bf2fbef18
MY_NAME_IS_EARL_SEASON2_DISC3
MY_NAME_IS_EARL_SEASON2_DISC4
PEOPLE_LIKE_US_SERIES2-2007081517503500-19deac38e6
PHOENIX_NIGHTS
POLICE_SQUAD
PORRIDGE
...

I copied the PEOPLE_LIKE_US directory to a thumb drive, and took it to my laptop. Having confirmed that this machine couldn’t play the DVD either, I installed the copied keys into the ~/.dvdcss directory and tried again. Voilà! Instant entertainment from Australia, and I still have all my region changes intact.

In summary, then: if you find a DVD that takes ages to start playing, and doesn’t fully work, the chances are that your DVD is set to the wrong (or no) region. Use the regionset tool to set your DVD drive’s region, or find someone who’s already watched the DVD, and ask them for a copy of the decryption keys.

January 8, 2010   Posted in: Linux/Ubuntu  No Comments

The ultimate get-rich-quick scheme

Since my email address is reasonably easily accessible on the Internet (I make no specific attempts to hide it), I get a fairly decent amount of spam. As an experiment, I thought I’d keep track of all the money I’m offered, just to see how rich I could be if only I bothered to respond to all the generous people who contact me.

In the 31 days of December 2009, I was offered a grand total of £105,668,800. £3.4 million per day, £142,000 per hour, or £395 per second. Not bad.

This sum includes $5 million that Michael Jackson apparently left me in his will, for being a special fan. Now, since I only bought one of his albums way back in 1989, I wouldn’t have thought I’d have made it onto Michael’s fan radar, but clearly this was one extremely generous man.

There are several implications to this. First, exactly how much money did Mr Jackson give away in his will? Even if we take Wikipedia’s conservative estimate of 65 million copies of Thriller sold, at $5 million per purchase, that’s $325 trillion straight away. And that’s just one album. No wonder there’s been a financial crisis – Michael Jackson had all the money in the world, plus a whole lot more that he wasn’t telling anyone about.

Second, someone must be doing some serious detective work. Just like several people I know, I wasn’t buying albums online in 1989. Tracking down the origin of a cash purchase to me (I was only 12, and credit card companies weren’t as generous then as they have been of late), tracing the various changes of address I’ve been through since then (eight, by my reckoning), and linking it all to my email address to let me know of this wonderful gift is a phenomenal achievement. The networks of collected information must be enormous. Big brother may well be watching us, but it’s OK – he’s only doing it so he can give us all lots of money.

The upshot of all this is that my money worries seem to be over. Except for where to keep it all. I’m not sure there’s a bank that I can trust at the moment, and if I want to keep it under my mattress, I’m going to have to raise the bedroom ceiling and buy a ladder.

January 1, 2010   Posted in: Ramblings  No Comments

Getting your numpad working again

Recently, I discovered that the number pad wasn’t working on my keyboard. No matter what I tried, I couldn’t get any of the keys to work – the Num Lock key changed nothing. Having freaked out for a while (had I poured a pint of water into the number pad without noticing?), I started searching through the control panel for things that may be relevant.

It turns out that Ubuntu had got itself into Mouse Keys mode, whereby the numpad keys can be used to move the mouse pointer. This handy accessibility option is activated by pressing Shift+NumLock, and it seems I inadvertently pressed it at some point. It’s a simple toggle, so pressing Shift+NumLock got me my number pad back again.

December 29, 2009   Posted in: Linux/Ubuntu  No Comments

Site Redesign

The site is undergoing a bit of an overhaul. Hopefully when it’s uploaded to the live server, everything will work straight away, but I won’t be surprised if it doesn’t. If you find that things aren’t working, please be patient – I’m working on it!

December 28, 2009   Posted in: Site News  No Comments