All posts by bigpresh

Blog moved to new URL

I decided that my old website was so hideously out of date (and hideously ugly) that it was time to retire the poor beast and move my blog from blog.preshweb.co.uk to www.preshweb.co.uk. So, my blog now lives here at www.preshweb.co.uk; all old links will be redirected automatically and eveything should Just Work ™, but if you spot any odd breakage, do let me know!

Official Playstation app for Android/iPhone

Sony released an official Playstation app today for Android & iPhone phones.

Just downloaded it (3MB, which seems excessive for what it does so far), to give it a try.

The main feature that appeals to me is seeing who’s online before going and firing up my PS3… I sometimes log in to uk.playstation.com via a browser, but it’s a bit slow and clunky; I was hoping this would be much slicker.

The first thing that strikes me as an obvious omission – there appears to be no way to sort your friends list by online status (or sort by anything, in fact!), nor to filter to “show online only”, leaving you scrolling up and down looking for online icons, which is hardly friendly.

It does give you access to game reviews/news etc, but that’s nothing particularly special, IMO. I think quickly seeing who’s online and what they’re playing, to decide whether to hop in a quick multiplayer game or not, is the key feature of this app, and it really hasn’t been done well.

EDIT: a comment from Sony on the blog post linked to above:

yes we know about the friend list order issue and we are planning to address this in the next version.

So, looks like it should be sorted at some point :)

Debian Xen kernel won’t boot until you create initrd image

I recently installed Xen on a Debian Lenny amd64 box, and found that the Xen kernel would not boot, failing to mount the root filesystem:

No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

I noticed in /boot/grub/menu.lst that the standard Debian kernel included an initrd image, whereas the Xen kernel didn’t:

# This is the Xen kernel that fails to boot:
title           Xen 3.2-1-amd64 / Debian GNU/Linux, kernel 2.6.26-2-xen-amd64
root            (hd0,0)
kernel          /boot/xen-3.2-1-amd64.gz
module          /boot/vmlinuz-2.6.26-2-xen-amd64 root=/dev/sda1 ro console=tty0

# This is the standard kernel that does boot:
title           Debian GNU/Linux, kernel 2.6.26-2-amd64
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.26-2-amd64 root=/dev/sda1 ro quiet
initrd          /boot/initrd.img-2.6.26-2-amd64

To get the Xen kernel working, I needed to create an initrd image, with:

dave@devvps:/boot$ sudo update-initramfs -c -k 2.6.26-2-xen-amd64
update-initramfs: Generating /boot/initrd.img-2.6.26-2-xen-amd64

Then update the Xen kernel’s entry in /boot/grub/menu.lst appropriately:

title           Xen 3.2-1-amd64 / Debian GNU/Linux, kernel 2.6.26-2-xen-amd64
root            (hd0,0)
kernel          /boot/xen-3.2-1-amd64.gz
module          /boot/vmlinuz-2.6.26-2-xen-amd64 root=/dev/sda1 ro console=tty0
module          /boot/initrd.img-2.6.26-2-xen-amd64

Upon rebooting, the Xen kernel boots succesfully, and Xen appears to be working:

dave@devvps:~$ sudo xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0 24106     8     r-----     22.4

So, if you’ve installed a Xen kernel on Debian, remember to create an initrd image. I’m fairly surprised that this doesn’t happen automatically when the kernel is installed, actually.

Perl advent calendars

It’s quite common in the Perl community to produce advent calendars, hosting an article per day in the run-up to Christmas – several projects do this, along with a few prolific authors.

This year, the Dancer Perl web micro-framework (a project I contribute to) joins the party, with the PerlDancer Advent Calendar 2010! We decided it would be wrong to not have the Dancer advent calendar powered by a Dancer app – dogfooding in action :)

Here’s other calendars I’m aware of (if you know of any I’m missing, feel free to let me know and I’ll update the post!)

And more that I’m not yet sure are going to run a calendar this year or not:

Dancer::Plugin::MPD released

I recently wrote Dancer::Plugin::MPD, a simple plugin to make it easy to talk to MPD (Music Player Daemon) from Dancer-powered webapps in Perl.

It uses Jerome Quelin’s excellent Audio::MPD – it simply provides an mpd keyword which returns a connected Audio::MPD object (connecting first, if we didn’t have a connection or it went away, otherwise keeping the connected object cached).

It makes for code as simple as this example from DancerJukebox:

get '/control/skip' => sub { mpd->next; redirect '/'; };

Dancer::Plugin::DebugDump released

I recently released a dead-simple plugin for Dancer – Dancer::Plugin::DebugDump.

During development, I fairly often find myself using Data::Dump to dump stuff to the debug log (which I usually have set to ‘console’, so it appears in the terminal I’m running the app from), with code like:

use Data::Dump qw(dump);
debug("Random hashref: " . dump($hashref) );

I got fed up with writing that, so I wrote Dancer::Plugin::DebugDump, which lets you say:

# give it a label and a reference/object:
debug_dump("Random hashref:" => $hashref);
# or just give it a reference/object:
debug_dump($someobject);

It’s not much of a saving, but it scratched an itch, and might possibly be useful to others.

DancerJukebox – music queuing Perl webapp powered by Dancer

I spent some of Friday night hacking on rewriting my music queuing webapp from Catalyst (which I wrote it in ages ago, before I discovered Dancer).

It only took a couple of hours of easy and actually fairly enjoyable coding to get it all ported over, and in the process I released two Dancer plugins – Dancer::Plugin::MPD to handle easily getting a working MPD connection, and Dancer::Plugin::DebugDump to easily dump objects and data structures to the debug log to simplify development.

This time round, the code is up on GitHub – DancerJukebox on GitHub. I never released the previous code, it was developed in a private Subversion repository, and I was never happy enough with it to release it.

The basic idea is that you fill the playlist with decent music and leave MPD playing on random. If people want to hear specific songs, they can use the web app to search for whatever they want and add them to a queue.

Continue reading DancerJukebox – music queuing Perl webapp powered by Dancer

Where my photos end up…

I tried out DuckDuckGo today, and of course one of the things you’ll often use to test a search engine is to search for your own name / online nick for a little bit of egosurfing, and I was surprised just how widely some of my photos from Flickr are used. Most of my images on Flickr are available for use under a Creative Commons attribution licence.

A few of my photos I found widely spread were:

I found this one at:

This image of my laptop turned up at, among other places:

The above image of my old Blackberry was used in a presentation someone gave on teaching keyboard skills to children, too.

This image of the pier in Rossport, Co Mayo (which I also uploaded to the excellent Geograph project) is currently used on the Wikipedia article on Rossport, along with the related Kilcommon and Sruwaddacon Bay entries.

Interesting to see how widely humble pictures can spread :)

Domestic appliance repairs in Stevenage & Herts

Just a quick plug for my future brother-in-law, who has gone self-employed doing domestic appliance repairs in/around Stevenage, repairing cookers, washing machine, tumble dryers etc.

I knocked up a basic site for him, and figured linking to it from here would help Google find & rank it :)

Edit: I’ve also registered stevenage-appliance-repair.co.uk and pointed it to his site, to see if that helps. Maybe it’s time to practice SEO crap.