Tuesday, 22 April 2008


I've long felt that the DSL moniker is a little inappropriate for some (perhaps most) applications of the ideas behind it. The majority of 'DSLs' are really just little languages which help solve specific problems in the software development space, e.g. Rake, which provides a very nice language for expressing graphs of dependent tasks.  Martin Fowler has written quite a lot on the subject of DSLs - this paper is a good example of a little language being described as a DSL.

So it was good to hear Jim Weirich (the creator of Rake) make this very point while talking about the DSL hype in this InfoQ interview. The relevant bit is something like 14 minutes in. I like the term Problem Specific Language (PSL), which Jim invents here.

I'm working on applying Ruby to modelling (and reasoning about) a real domain, and driving a tool-chain for forward-engineering artifacts from the Ruby description. Apart from Rake, I'm also looking at RSpec, which uses Ruby syntax to capture descriptions of system behaviour. I'm very keen to work on the 'real DSL' problem, looking for the sweet-spot where domain-driven design and programming overlap. This whole area seems very fruitful for Ruby, because the language allows us to create very rich and expressive scripts which not only read quite naturally, but can also control complex processes.

Thursday, 17 April 2008

Wubi and Xubuntu

After the last foray into the world of Linux I swore I wouldn't bother for another year or so.  Somehow I came across a link to Wubi and decided it sounded too interesting to ignore.

Live CDs are not really practical for doing anything much more than a cursory look and installing to a partition is too much work. Wubi is a very clever 'third way', installing a distro as if it is a Windows application, yet actually allowing the OS to start from the Windows boot screen, at full speed.  Clever stuff.  It uses a virtual disk (like VMware), which the Wubi creators admit will make file I/O slightly slower.

Wubi is set up to work with Ubuntu Linux, which most people will experience via Gnome and the rather, er, brown theme.  Ubuntu is also available with KDE but there's a third alternative, Xubuntu, which uses the xfce window manager. I like this even more because it's lighter/faster than either of the others, and offers just enough functionality, without getting in my way.  I simply don't need (or want) a lot of silly 3D desktop effects, nor a hundred different ways of playing media files.

I simply ran the installer and selected Xubuntu.  Some time later, it was ready.  Reboot, select Xubuntu, and there it was.  Amazing!  Even more amazing was the fact that Xubuntu located all the laptop hardware including the sound and WLAN chipsets.  As soon as I selected the network applet, it offered to connect me to my home WLAN.  I was running and connected to the internet in minutes.  No other installer/distro combination has got even close to being this good.  Xubuntu is excellent - I have had no difficulty in installing the extras I need (Java JDK, OpenOffice and Netbeans, for example) via Synaptic.

There is a way to convert the Wubi install to something more permanent using LVPM.  I will probably do this, but only when I've sorted out the partitioning of the drive - a chore I'm not looking forward to.

Thursday, 3 April 2008

Tomorrow's code

I've just finished reading this piece by Bill Thompson, on the BBC Technology site. After a potted history (taking in the dear-old BBC Micro, of course) he makes a good point about the way we no longer seem to be encouraging school students to learn to program: greater importance is attached to teaching them to use office suites and accessing the internet than to enquiring into how all this software got written, or why it isn't more reliable.

This is just one symptom of a larger problem facing science and engineering generally. Physics is under threat, engineering (so we hear) is less popular than ever, and it often feels as if greater value is placed on producing 'entrepreneurs' and managers than engineers. I think we're running the risk of forever losing our position as world-leading engineers and innovators; perhaps that position is already lost?

I want to see people excited and enthused by the truly great scientific challenges facing us. Our future national prosperity depends on us being smarter than the competition: we cannot grow bigger, we cannot be much more populous, we cannot rely on mineral or oil wealth, and surely we are beginning to appreciate just how precarious our position can become when we depend too much upon financial markets whose behaviours are globally linked, not wholly predictable and not under our control.

We seem to spend a lot of time looking back wistfully at past triumphs (like the invention of Radar, cracking Enigma and the birth of computation, discovering DNA), rather than looking forward and preparing to celebrate the next ones. Are we talking ourselves out of a great future, collectively mentally preparing ourselves to accept that our greatest achievements lie behind us? Do we really want to turn our country into a kind of museum whose dusty artifacts catalogue a brilliant past?