elliot's blog


Cake is a pretty nice MVC, Ruby on Rails-like framework for PHP and MySQL. I've written a very simple CD manager application using it, which took me about a day; I then spent about another day writing some authentication code which plugs into it to do simple authentication against a MySQL database. I need to refactor the code a bit (e.g. make it configurable via a file) but it works OK as a first pass. (I would like authentication and authorisation to be in the core of Cake, so if I'm feeling brave I might submit my code.) If you're used to Rails, Cake is not too hard to pick up; or, for that matter, if you're used to MVC more generally. As it's in PHP, it's also fairly easy for me to extend. However, it is far less mature than Rails, and doesn't support the full set of Rails features. Plus the documentation is nowhere near as good. I think I'll stick to Rails for now, but Cake is worth keeping an eye on, and it's something I can mention to PHP programmers we work with at OpenAdvantage who are looking for a decent MVC framework.

Bits and pieces

As I have the house to myself this week, I am spending the evenings tidying up stuff I've been meaning to do for months. Namely:

  • Experimenting with using DOSEmu to run my old DOS games, including Ascendancy. (I plan to put together a howto explaining this as the DOSEmu documentation is far too complex).
  • Putting up photos of our holiday in the Scilly Isles, holiday in York, and latest pictures of Madeleine; then adding captions to as many as I could manage.
  • Fixing a few bugs in my music manager script and putting it up for download. Here's a description of the script plus links to download it.
  • Getting the latest source release (0.9.4) of gtkpod and compiling it, so Nicola (my wife) can use it with her iPod Shuffle (this version of gtkpod is the first one I've noticed which supports the Shuffle).

Ruby on Rails installation guide

I've just put up an installation guide for Ruby on Rails on XAMPP with FastCGI on Ubuntu Hoary (phew!). I thought it was worth writing this up, as I had my first enquiry from a client about Ruby on Rails last week, and get the feeling that some of OpenAdvantage's more adventurous clients might be interested in it.


TiddlyWiki is a one HTML page, Javascript-based wiki engine, which requires no server-side scripting. You basically edit a single page which constitutes the whole wiki, save it to disk, then upload it to your website (if you want it to go onto a live site). It works pretty well, though when I deleted the title for a "tiddler" (the name for a wiki entry), it disappeared into limbo, so I could no longer edit or delete it, at which point I abandoned TiddlyWiki. Could be useful for people with no server-side scripting to enable them to create a dynamic site, though. Also a good example of the pretty things you can do with DHTML.

Tagged filesystems

A friend of mine has long hankered after a filesystem with metadata. This is an interesting first pass at the problem.

Dr. Who Technical manual and Horror Top Trumps

I would have loved this when I was a kid. And why did I never have these Top Trumps? Who can resist Top Trumps where you compare "killing power" and "fear factor"? I got to these via Slashdot, where someone posted about the Ladybird computer books: funnily enough, I have a near-pristine, 1971 edition of this which someone bought me for Christmas. It's a great read.

I didn't realise I was so short

Went to hospital today for a liver test, and they decided to measure my height to work out my body mass index. I am 174 cm tall, apparently. I did a quick conversion, and it turns out all my life (since I've been about 16) I've been telling people I'm 5' 10", when in fact I am 5' 8 1/2". Either I've been labouring under a misapprehension for most of my life, or I'm shrinking. Depressing, really.

Birmingham bomb alert

Just heard on the news that police have carried out controlled explosions in Birmingham city centre. They are also evacuating the city centre, starting with Broad Street (where I work). Just hearing on the news that a suspect package was found on the 105 bus, in Corporation Street, and was detonated in a controlled way by the police. I've been a bit nervous since the London bombings, especially since I go to work on the bus and work on one of the highest profile, most conspicuously decadent streets in Britain's "second" city. Also a bit nervous because my wife is travelling back to the city tomorrow from London by public transport. But this won't stop me going on with my usual business next week.

Why do people suffer Windows?

I finally got round to installing Ubuntu on my OQO (thanks to Jono's external CD drive - the OQO is fussy about external drives and didn't like mine; and Paul finding an invaluable FAQ). The only issue I had was bizarre: when the wireless disconnected, the mouse went haywire. Got it sorted now though. Installed all my essentials: Thunderbird, Googlebar and del.icio.us extensions for Firefox, RealPlayer and Flash plugins.

The interesting thing is, I used my OQO with all these applications for several months, but running under Windows. And already the Ubuntu experience outstrips Windows. Here's why:

  • Wireless is far more reliable and drops out far less often. Also, if the wireless does drop, Ubuntu picks it up almost immediately. On Windows picking up again sometimes took 30 seconds. Plus the wireless monitor in Ubuntu shows signal strength, so I can tell when the wireless is losing signal. This is a big winner for me, because the wireless drops in Windows annoyed me almost to the point of launching the OQO at a wall.
  • I've got all my developer/networking tools to hand without having to go and download them: zip, tar, ssh, ftp clients, Python, Ruby, messaging clients.
  • Good lightweight multimedia programs are there already: PDF readers, audio players which can handle ogg files, video players, rippers, CD burners galore.
  • If I plug USB devices in, I don't have to hunt for driver discs.
  • The unit runs much cooler than it did under Windows, and the whiny fan starts up far less often.
  • Although I probably won't use it much, I have a full Office suite available, capable of handling any Microsoft Office files.

Why on earth would I want to use Windows? Admittedly I am reasonably adept with Linux, but Ubuntu and other modern distributions are in my opinion on the verge of overtaking Windows for ease of use and value for money. Sometimes it seems criminal that so many computer users can't see what they're missing.


Plodding along this week: nothing earth-shattering, but steady progress. I've taught my PHP+MySQL FastTrack course several times now, but I'd been squeezing as much as possible of a 5 day course into 2 days. This felt a bit of a mess (though the trainees so far haven't noticed, it irked me). So I decided I'd write a cleaner, more integrated 2 day version of the course instead, and have been working on it this week. Nearly done: just some stuff on sessions to complete.

It's interesting writing PHP after spending some time writing in Rails this week. PHP coding makes you think at a much lower level than Rails: how should I write MVC? which frameworks should I use to talk to the database? which templating system should I use? how should I integrate them? Rails lets you move your decision making to a much higher level of abstraction: what is the data model? what is the flow of control for this part of the application? Coding in PHP after Rails seems hopelessly unproductive and scattershot. I think Rails demonstrates the point (as does Ubuntu) that choice isn't necessarily good: you want someone intelligent to make good decisions for you, so you can concentrate on important problems. I suppose that's why people have personal shoppers.

LUGRadio Live was great last Saturday, with Mark Shuttleworth and Bill Thompson being my highlights. Bill's talk was particularly good from an open source advocate's point of view, as he emphasised risk as a factor in choosing between open source and proprietary software. Bill's point being: if he chooses open source, he has far more control over risk to his project, as he is not locked into a vendor (providing he is prepared to familiarise himself with the codebase, or pay someone else to). I've been thinking about this a bit, and think I'll try to work this angle into my seminars from now on.

Syndicate content