Dear Mr. DPD Courier

Wednesday, April 2nd, 2008

DPD logoHow can I put this? You’re not the sharpest tool in the shed, are you? Please, please, when I’m out and you try to deliver something, do not tape the card saying “sorry we missed you” to my front bloody door at eye level! You see, it might not cross your mind that there’s anything wrong with that, but as I say, you’re not exactly Richard Feynman. The card says “sorry we missed you” but it might as well say “The occupiers of this house are out. Burglars, help yourselves!” Just put it through the letter box, would you please?

On top of that, while I’m at it, please fix your systems. Both your website and your automated phone system, after a lot of faffing about entering consignment details, can’t connect to your SQL server and so fail. It ought to be pretty simple just to get a few printer cartridges into my sweaty mitts, but it appears not.

Parceline may have changed their name to DPD, but they’re still buffoons.

By the way, what made your phone system think I wanted to hear about a new comedy club in Plymouth while I was on hold? Huh?

[later..]

A new error!

dpd_error.gif

Cobblers.

Start Slide Show with PicLens Lite PicLens

Getting PicLens to play nicely with WordPress pretty permalinks

Sunday, March 9th, 2008

When the nice lady on the BBC showed me the PicLens plugin, I knew my search for a cool way to show visitors my photos was finally over. I always liked Lightbox and its variants, but I wanted something that would allow people to easily browse the pictures and show them full screen with no distracting clutter. PicLens does all that, and in a very nice way. Even when you don’t have the plugin (and there isn’t one for Opera, for instance) or Flash installed you still get a pretty nice JavaScript alternative.

They provide easy ways to integrate PicLens into your site, including the wp-piclens plugin for WordPress. But there’s a snag. Out of the box, at least for me with my WordPress 2.3.3 installation, it only works properly when pretty permalinks turned off. (That means http://home.toastboy.co.uk/?p=123 style links would work, but not my preferred http://home.toastboy.co.uk/2008/03/09/sample-post/ ones). The way it would fail is that when you click on the “Start Slide Show with PicLens Lite” link which the plugin helpfully inserts into posts which have images in them, PicLens opens up but sits there forever with a “loading” progress bar, not getting anywhere.

Time to break out the debugging chops :->

It turns out that PicLens was actually getting a 404 error when it requested the Media RSS feed from wp-content/plugins/wp-piclens/mrss.php. Weird, since when you request the feed directly, you’d be confused to see that the feed actually appears - but sure enough, look at the headers with Live HTTP Headers, and the response code is a nasty 404 instead of the nice 200 we might expect. This is caused by the way that wp-piclens invokes the wp() function to generate the MediaRSS. To cut a long story short, the WordPress parse_request function assumes that when URI rewriting is turned on, it’s going to generate a 404 error. Then, if and only if it finds a rewrite rule to successfully apply, it resets that error. So, despite the fact that the URI for the MediaRSS feed doesn’t actually need rewriting, you get a 404 error when you request it when URI rewriting is turned on. The fix? Add a hook in the plugin to rewrite the mrss.php URI onto itself, like this:

function feed_dir_rewrite($wp_rewrite)
{
$feed_rules = array( 'wp-content/plugins/wp-piclens/mrss.php' => 'wp-content/plugins/wp-piclens/mrss.php' );
$wp_rewrite->rules = $feed_rules + $wp_rewrite->rules;
}
add_filter('generate_rewrite_rules', 'feed_dir_rewrite');

Then you need to force the rules to be re-generated: go to Options/Permalinks in your WordPress dashboard, select “Default” and hit “Update Permalink Structure”, then re-select your preferred permalink method (mine is “Date and name based”) followed by another “Update Permalink Structure”.

That should be it! Now when you click on the “Start Slide Show with PicLens Lite” link, you should see your photos on the PicLens wall in all their glory.

(Now I can finally get on with adding some content instead of fiddling with infrastructure… maybe…)

A crumb for those trying to get SSHFS working with Debian Etch

Sunday, February 3rd, 2008

In the middle of setting up my shiny new dedicated host for serving the growing toastboy empire, I realised it would be really handy to have a transparent filesystem link between the old server (a Debian Etch VM).

Now, here’s a good howto about sshfs on Debian, but for me, it didn’t quite work. When I got to the point of trying a modprobe fuse, I got the error FATAL: Module fuse not found.. So after a bit of thrashing about I realised that the missing link was this: you need to do depmod -a before modprobe fuse will work, and then everything behaves as expected.

I Have Pickled Turnip in my Fridge

Saturday, October 13th, 2007

…and you haven’t.

That is all.

What Could Inspire me to Post After Such a Long Time?

Thursday, October 11th, 2007

Woo ha! I am turning cartwheels of sheer joy. Sure, Em and I got married and had a fantastic honeymoon and all, but there’s something else that’s making me want to shout from the rooftops:

They’re making a movie of Fraggle Rock! Yay!

Meet Johnny Badger!

Friday, August 3rd, 2007

meet_badger.JPG

Well, we were hardly expecting this. Out last Sunday, walking Des together by the river to avoid the Folk Festival campsite, we bumped into our favourite neighbourhood Collie fostering friends. They only had half their current compliment of 11 (!) dogs, but amongst them was this little charmer, Johnny Badger. He’s a rescue pup who’s mostly Collie plus some other miscellaneous breeds thrown in, and a right character. He comes from a rescue in Ireland via Wiccaweys in Northamptonshire, and he’s had a tough time in his 16 or so weeks of life: he’s been nursed through Parvovirus. We were meant to pick him up yesterday, but had to contain ourselves because Des managed to pick up some infection or other (well, drinking from the Cam and eating cow-crap will do that to anyone) and so we’ve been advised against taking Badger in until Des has finished the antibiotics.

Are we mad to take on a pup that might turn out to be a hooligan? Yep. Can we wait? No.

Start Slide Show with PicLens Lite PicLens

Ubuntu Feisty Myseterious Freezing Problem

Friday, July 20th, 2007

Solved!

It would appear that Ubuntu’s powernowd has problems with AMD Cool ‘n’ Quiet, at least on my Asus A8N-SLI Premium motherboard. Turning off Cool ‘n’ Quite (crap name) in the BIOS menu solves the problem where I’d be typing away and the machine would just freeze hard, to the extent that mouse-waggling had no effect. I’m really not used to Linux doing that to me: that’s Windows territory.

To be honest, though, I don’t have a terrific amount of confidence that the Asus A8N is a rock-solid motherboard. I’ve always used mostly Asus motherboards, and never had cause to complain. But this one’s always been a bit iffy. It “supports” 4 slots of DDR400 RAM, up to 1G each, but one of the BIOS revisions had a mysterious “update” feature which just said that if all four slots were populated with 1G DIMMs, it downgrades the RAM clock to 333Mhz. WHY? Presumably just because they’ve got problems they can’t resolve any other way. I think the next mobo will be a Tyan.

Tagging Photos with GPS Using a Windows Mobile PDA

Wednesday, June 13th, 2007

This is a cracker. Use your existing PDA’s GPS receiver to write a GPX log, and then use it to tag your photos with the exact location where they were taken later, with no connection between the GPS receiver and the camera necessary!

Here’s how it works. It’s all about time. A GPX log just records the raw data coming from the GPS receiver - basically just a very accurate time together with an exact location, at intervals along your journey. Digital cameras tag the photos you take with the time and date they were taken - so all you need is a piece of software that’s smart enough to take the timestamp and use the GPS log to turn it into a position.

Here’s one way to do it:

First, I needed a program for my PDA phone: a t-mobile MDA Vario (also known as iMate K-JAM, Qtek 9100, HTC Wizard, etc. etc. - man, I hate re-badging like that) running Windows Mobile 5. It doesn’t have a buit-in GPS receiver - my next phone will (HTC Kaizer) - but I do have a Bluetooth GPS unit which works just fine for the moment. I wanted a program that would also allow the GPS port to be connected to another program while the logger was active, so I could still use it for navigation. What I found does exactly that: I can still use TomTom Navigator at the same time. The logging program is called SunsetGPSLogger and it works a treat. It does have a couple of foibles, but what do you want for free? It doesn’t remember what port your GPS receiver is connected to, so you have to set that every time you launch it. It has a hard-wired path to the place where it will write the logs - and that path is in /Storage Card, so you’d better not have an empty expansion slot. It also has some useful smarts, though: not least the clever algorithm which only writes “good quality” waypoints to the log. Anyway, it writes lovely, compact logs - now I need something to use those logs to tag my photos.

That’s where GPicSync comes in. Again, it’s free, and again, it’s nifty. You point it at the GPS log, and you tell it where the photos are, and you press a button. Actually, it’s also a good idea to tell it the difference between your camera’s clock and the proper GPS time: it’s less easy to keep camera clocks spot on than those of a PDA.

Press the button Synchronise button, and off it goes - writing to the EXIF tags of your photos, and even backing them up if you want, in case it messes things up. It even has a button to show the results in Google Earth once you’re done. Very, very nifty.

My Ten Firefox Addons

Tuesday, May 15th, 2007

This is as much for my benefit as anybody else’s - for when I set up or reinstall yet another machine for myself.

  1. Adblock Plus: Gotta kill the ads. The very best internet experience is that without twonks trying to sell you things. Of course the other benefit is that pages load much quicker since they’re much smaller without the ads, and your browser has to contact fewer places on the Interweb.
  2. Adblock Filterset.G Updater: The way to keep the blocking capabilities of Adblock up to date. This add-on just downloads the latest version of the master list which tracks where the ads come from.
  3. Google Browser Sync: This one is very clever. It will sync pretty much everything in the inner workings of your browser between all the machines on which you have it installed. This includes bookmarks, cookies and history - although you can turn off the bits you don’t want synced. A real time-saver, this makes flitting about between work and home an absolute breeze. Not for those with something to hide, I guess, since it uploads your dirty secrets to Google servers, but I don’t care ’bout that.
  4. Morning Coffee: A simple but dead good idea - really, in effect it’s just multiple bookmarks that open with the click of a single button. What do I have on mine? Well, a share price check or two, plus Get Fuzzy, Dilbert and Google Reader.
  5. Firebug: Great web development tool. You can poke around in the way any page is put together, and debug JavaScript if you want (I don’t do that since I think it’s broadly evil - see below :->)
  6. Web Developer: Another very full-featured web development add-on. I use it in particular to nose around in the HTTP response headers, but it will do a lot more besides.
  7. Aardvark: Last web development one, I promise. Possibly a bit overkill to have this instead, but this one is very good at figuring out what’s going on with your style sheets and so on. You can find what box comes from where, and even hide page elements to experiment with what happens to the layout. Invaluable.
  8. NoScript: A way to turn off potentially dangerous JavaScript and (less dangerous in my opinion, but hey, whatever) Java and Flash. You can make exceptions for sites where you really need it, and you really trust. It takes a while to bed in, but it’s well worth the effort. Google can take you anywhere these days…
  9. LiveHTTPHeaders: Actually I just realised that on my main home machine, I installed this a while ago and it’s even handier than Web Developer for dissecting headers. It can display headers as they fly past in the sidebar, which is very handy indeed. I’m sure some little gits use it to put together XSS attacks, but its powers can also be used for good (like getting caching right).
  10. StumbleUpon: Saving the best till last. Well - if by “best” I mean “best destroyer of productivity”, anway. Bloody thing. It turns up all sorts of crap that you really shouldn’t waste your time looking at, which of course is the whole point. Apparently eBay are going to pay umpty-thrumpty* million dollars for it soon, if they haven’t already.

*Yes, yes, I do listen to Mark Kermode’s film reviews. As a matter of fact, I listen to more reviews than I watch films, and it’s all down to him and the way he witters with Simon Mayo.

Why DRM must die

Saturday, April 28th, 2007

I just spent the first 20 mins of the Forest game pissing about trying to get the godforsaken Microsoft DRM working according these already outdated and horrifically arcane instructions.

This is content for which I have paid, and I really don’t see why I should even have to consider the possibility that I have to dig around in the guts of my PC’s configuration in order to get it.

Whoever decided DRM was a good idea, I hope your rabbit dies and you can’t sell the hutch.