Making Wiphi Good

BBC News has an article about the Slim Devices’ Transporter wi-fi music player.

As usual when I read about such things I tend to compare it to wiphi, the music player that I built.

It’s interesting to note the amount of work that would have to be done to get Wiphi up to the spec of something that is commercially available.

Visual appeal

My player looks attractive initially.

But it’s a bit chunky, and the green VFD display is not very readable.

Ideally it would be half that height and have a blue LCD display.

It would also have a nice responsive dial for controlling the volume.

It could also do with a nice logo.

Remote control

It doesn’t have a dedicated remote – it’s just configured to use any remote that works with LIRC.

Building a remote control from scratch is beyond my skills.

User interface

The overall user interface isn’t too bad, but it’s not slick.

There’s no indication of what is going on until the box has booted (takes a few minutes as it boots over the network).

The only interface is the remote control and the display panel at the front – which is a bit limiting. It needs an on-screen display on the TV ideally.


I wrote the software myself – it’s essentially some “glue code” (written in Java) between MPD, LCDproc and LIRC.

If it goes wrong and crashes the only way to deal with it is to ssh in and look at log files.

It is MPD based though – I could set it up so that I could control it from a Web browser on another machine for example.

There’s no way to configure it beyond hacking XML files and restarting the box. That could be fixed – but would require a Web interface of course.


It would obviously need a lot of work to get it up to speed.

Also, the software work is far more likely to happen than the hardware work.

I’m not really good with hardware stuff, plus I’ve spent enough on kit for it already.

It’s an academic question anyway, I’m unlikey to give up my day job and build music players for a living.


Programmer’s Diary (part three)


I want to ensure the app is pretty robust.

By which I mean that it shouldn’t crash (much).

This obviously involves writing proper code.

It also involves dealing with user input and the Flickr API in a sensible manner.

It’s reasonable to state that no user input should cause the app to crash.

To achieve this aim I will be treating all user input with extreme prejudice.

By user input I don’t just mean forms on the site.

I also mean any form of “URL hacking” too.

I also need to look at all the possible error conditions that the Flickr API can throw at me and deal with them gracefully.

Errors from Flickr will either be network errors (come back later when it’s better), invalid XML (will need to be investigated to see if I can work around it) or one of its published error codes (should be the easiest to deal with).

* Robustify is a word some shit contractor used in a CVS commit message after I slagged off his toString method.

I think it’s an awful word so therefore I enjoy using it in an ironic manner.

And now, for some gratuitous photos.

Empty shop
Empty shop
Candy Chinatown style
Candy Chinatown style

Programmer’s Diary (part two)

So, as discussed previously I’ll be coding against the Flickr API.

I’ve done this before and back then I wrote my own code to do it.

This was fair enough, I was only calling about 4 API methods.

But as I’ll be making a lot more use of the API this time I’m going to use Flickrj instead.

Flickrj is simply a Java wrapper around the Flickr API.

It seems to cover all the stuff that I want to do so no point writing my own interface.

The first thing that I usually do when using any new Java library is to get a copy of the Javadocs onto my local Web server and get a copy of the source code onto my machine.

I then set up Vim and ctags so that I can browse and jump to the source code from within Vim (sorta like an IDE, only not as good).

Having done that I started getting to grips with Flickrj.

Unfortunately the first thing I needed to do was to authenticate against Flickr.

Flickr’s authentication system is complicated but it’s also clever. A person can authenticate against Flickr via my site without providing me with any details about themselves. Clever.

It also works in slightly different ways depending on what type of app you are writing, Web, mobile or desktop.

Flickrj didn’t seem to be set up for Web authentication and I’m writing a Web app.

Time to start hacking on the Flickrj source code.

I moved the source for Flickrj into my project so it sat alongside my own – this way I could compile once and pick up any changes to both sets of code.

Once I had done this and added the method that I needed I got it to authenticate.

I then found a number of minor bugs in Flickrj, so I had to fix them too.

I then emailed the lead developer to ask if he wanted me to send him some patches, but I haven’t had a reply yet.

Right, that’s enough for now, next time I’ll talk about “robustifying” my app.

To go on with though, here are some random photos that I’ve taken in London these last few weeks.

Covent Garden
Covent Garden
Lunchtime photography wander (2)
Lunchtime photography wander (2)
Millenium Silhouettes
Millenium Silhouettes
Sunset throught the trees
Sunset throught the trees

iPod Traveller

I met the hosts of the iPod Traveller podcast, Nick and Opal today.

This is by far my favourite podcast – officially it’s a travel show, and it’s informative enough at that but it’s also absolutely hilarious listening.

I had read on their site that they were doing a trip to Paris on Eurostar and as I walk past the terminal on the way in to work I dropped by to say hi.

Sadly they were running late so we could only chat for 5 minutes before they had to check in.

I didn’t even have time to take any photos.

They tried to persuade me to join them but some combination of no passport and having to go to work stopped me.

Next time I’ll be a bit more organised and join them for sure.

After they went I wandered around and took some photos before heading into work for the day.

Admiring the view
Admiring the view

Virus Pie

Two weeks before Christmas I received an email claiming that if I clicked the link within I’d receive a free mince pie.

Though doubtful of its authenticity I clicked the link.

Two days ago I received a small package at work.

I didn’t know what to expect when I opened it (having long since forgotten about my mince pie email).

To my delight inside was a mince pie and a note.

Dear Mr Greaves:

Thank you for taking the time to download and install our MSN Messenger 8 Beta Software and/or malware.

Please find enclosed one mince pie as a token of our appreciation.

So there.

Next time you receive an email promising you a mince pie if you click the link; click it.

The pie doubters laughed, I laughed last.

Virus Pie
Virus Pie

My digital workflow

I was listening to the Tips from the Top Floor podcast and there was an interview with Randal L. Schwartz (of Learning Perl fame) and he was talking about his digital workflow.

Randal is of course a geek, so his digital workflow is typically geeky, lots of custom scripts and use of Unix tools to automate stuff etc.

After he’d described it all I realised that my workflow was quite geeky too.

So I thought I’d describe it here for fun.

It can be broken down into 4 stages.

Transferring photos, post production, Web processing and Flickr interface.

Also, some of it is done on Linux, some on Windows and some on the Web.

Stage 1: Transferring photos (Linux).

I use a Canon EOS 20D which in turn uses Compact Flash. To get photos onto my camera I have a short script that copies files from a compact flash card reader onto the PC. The only interesting thing that it does is to create date-stamped directories and store photos according to the date of their timestamp.

It also simplifies an otherwise fiddly task.

Stage 2: Post production (Windows).

Once all the photos are copied across, I can access them from Windows via a samba share.

As I shoot RAW, the first step is to convert them into a universal format.

For this I use Capture One.

I quickly go through the images, deleting any that are obvious rubbish.

I tend to keep the majority of what I shoot though.

Then I run through in more detail and fix any exposure and white balance issues. Capture One makes this very simple and allows me to do stuff in batch mode too.

Lastly I convert them all to TIFF format.

For any that I want to do some further work on I open the TIFF in Photoshop and do some additional work there.

Stage 3: Web processing (Linux).

I then process the images for displaying on the Web.

Firstly I use an app called Exiftool that generates thumbnails from the RAW files.

The reason I do this is that Exiftool maintains all the Exif data from the images – (Capture One loses any Canon-specific tags).

The next step involves a perl script that creates 3 JPEGs for each image (small, medium and large) then copies the files to this Web server.

Once the files uploaded I can then import them into my Photo database (a custom Web app written in Java).

First it display the thumbnails on screen where I can set location info and add any tags or titles to the photos.

Next it imports the photo information (made up of the Exif data and file sizes) into the database.

Stage 4: Flickr interface (Web).

The final (optional) step is uploading photos to Flickr.

As Flickr provides a comprehensive API it’s straightforward to code my app to upload photos to it.

I decided against using flickrj as it was more fun to roll my own code and learn the Flickr API.

The API also lets me set the tags, title and description that will be used on Flickr.

One of the nice things about doing it this way is that I can read some of the Exif data and set it as tags on Flickr. Stuff like the camera and lens used and location information is all picked up from my database and automatically added to my Flickr tags when I upload.

So all I do is view a photo in the Web app then click “Upload to Flickr”.

It appears in my Flickr photostream a few seconds later.

So, there it is; convoluted, idiosyncratic, geeky in the extreme and probably only of interest to me.


Couple in Richmond Park
Couple in Richmond Park
Winter Walk in Richmond Park
Winter Walk in Richmond Park
Tree in Richmond Park
Tree in Richmond Park
Richmond Park
Richmond Park

New England Photos

Photos from my recent trip to New England; more on Flickr.

One of the annoying things I discovered when I got back from my holiday was that I seemed to have picked up some annoying dust spots on my camera sensor.

Aside from learning how to use the clone tool in Photoshop I also ordered an “Arctic Butterfly” from Visible Dust.

After reading good things about it at Luminous Landscape I hoped it would fix my dust problems.

It arrived today and I tried it out just now and it has worked incredibly well.

I can’t see a single spot, and I counted about 20 in the test shot I took before cleaning.

So, no more cloning for me!

The other annoying thing was that the iPod that I had been storing photos on whilst on holiday managed to corrupt about 10 of my photos.

I have no idea what went wrong – several hundred others were fine.

As long as the iPod can’t view RAW files, there’s always a chance that this could happen again.

Serves me right for not buying a dedicated photo storage device I guess.

Beacon Hill
Beacon Hill

London Java Meetup

Last night’s London Java Meetup was good fun.

I didn’t personally get involved in talking about Java, but I overheard enough buzzwords to be happy that it was actually being talked about.

In fact, at one point a few of us got our cameras out and it was more like a Flickr Meetup.

Simon had asked me to bring my camera along and to chat to Tulna about her new Nikon D70s, and then Jez asked me to take some photos for the meetup site – and who was I to refuse! 🙂

I’d been sensible enough to take my 50mm lens, figuring light levels would be low.

It was hard work with such low light levels but I managed a few half-decent shots at ISO 1600.

I think I managed to convert a few people to the way of the 50mm too.

I also asked people along to the next Flickr meetup too.

Then I had a good chat with Jez about backup strategies and other geeky things – which brought me around to the idea of buying an external USB drive for backing up my photos and music.

Lastly, as a place to store the photos I created a Flickr group for that and future meetups.

London Java Meetup
London Java Meetup
Mmmmm, Apple
Mmmmm, Apple
London Java Meetup
London Java Meetup