Aim High

In the light of the Raspberry Pi project’s attempt to reintroduce kids to the idea that a computer is something you program, I thought I’d share with you something from my own childhood. Specifically, a book:

Unlike more modern children’s books, it doesn’t state a target age, but I believe it’s aimed at junior school children1. As you can see, it’s illustrated by with lots of little cartoon robots acting out the various operations that occur in a computer. And it teaches you machine code.

I can imagine some readers reaching for their pedantic hats. “This man is a fool,” they’re thinking, “who clearly doesn’t know what ‘machine code’ is. He obviously means ‘assembly language’.”

Au contraire2.

You see, in the mid-eighties, computers weren’t quite so impressively specced as they are today. Unless you had the Rolls Royce of home computers, the BBC Micro3, you wouldn’t have had the luxury of an assembler. You had a BASIC interpreter, and you considered yourself lucky. The book provides a listing for you to type in. This isn’t an assembler, of course: it’s just a program that allows you to type in bytes, in hex, to be poked into consecutive locations in memory. Once you’ve learnt hex on page 11, of course.

In 48 uncrowded, extensively illustrated pages, it goes from explaining things like binary and the difference between RAM and ROM, through addressing modes and registers, to writing real (if simple) machine code programs. In two different architectures, on half a dozen mutually incompatible computers. This is an impressive scope for such a slim book, made even more ambitious when you consider it’s aimed at children.

The important message is that this level of depth doesn’t scare kids off; instead, they lap it up (some of them, at least). By all means provide simpler material for those without the time, inclination or ability to tackle the complicated stuff. Just make sure you provide something challenging to keep the interest of those who can.


  1. I think I picked up this copy at a library sale when I was ten or eleven, but I could be out a year or two either side.

  2. A fool, no. Pretentious, possibly.

  3. Or it’s younger sibling, the Acorn Electron, which was a cheaper, cut-down version for those who weren’t rich enough to afford a BBC Micro, but weren’t cool enough to own a Spectrum. Guess what I had. (Actually, it was a fantastic machine that managed to get the vast majority of the features of the Beeb into a more affordable package for the home market.)

Raspberry Pi Launched

Today saw the official launch of the Raspberry Pi low-cost computer. Although there have been a couple of hiccups due to the distributors not expecting the phenomenal levels of demand1, it’s still a big day for the project, and a testament to the months and years of the hard (and unpaid) work of everyone at the Raspberry Pi Foundation2.

However, it’s worth remembering that the project is not about cheap computers for hobbyists (although that’s a useful side-effect); it’s about giving kids the tools with which to learn to program. To that end, here’s a video from the BBC’s Rory Cellan-Jones (who has also written a great article about the launch):


  1. Personally, I don’t think these teething troubles are a big deal, given the level of interest in such a small organisation. What has irked me somewhat is the level of vitriol directed at the Foundation. This has ranged from the merely thoughtless to the utterly vile, with occasional racist and homophobic language tossed in for good measure. It smacks of both a lack of respect and a sense of entitlement that would be comical of they weren’t so deeply unpleasant. Liz has been handling this with more patience and good grace than I think I would have been able to muster in the circumstances.

  2. I don’t have any formal connection to the Foundation myself; I’m just an enthusiastic supporter.

VNC on the Raspberry Pi

Here’s a quick demo I’ve put together, showing the RaspPi running as a VNC client:

The setup is a slightly unusual one; instead of the client connecting to the server, it runs in listen mode, and the server initiates the connection. This allows the RaspPi to be used as a kind of shared, network display. The software on the RaspPi end is TightVNC, which is available in the Debiam ARM repository. On the server side, I used Vine Server, as the built-in server on Lion doesn’t support reverse connections (if you want to use the normal client/server arrangement, the built-in server is fine).

The reason that VNC supports this back-to-front arrangement is interesting in itself. ORL (later AT&T Labs Cambridge), the birthplace of VNC, also took a significant interest in location-aware computing, firstly with the Active Badge, which could track users to the granularity of a room, and then with the Active Bat, which could do so within a few centimetres. I worked at the lab for a year before starting my PhD (which they sponsored), in the project exploring the sort of applications you could build with this sort of technology.

One of the simplest and most effective was display teleporting. If you wanted to show someone your screen, you just held your Bat (or, in earlier versions, your Badge) against their monitor and pushed a button. Hey presto, via the magic of VNC reverse connection, there it was. Even though this application hasn’t exactly become ubiquitous, the reverse connection mode that was added to VNC to support it has remained a standard and useful feature. The location-aware technology lives on as well.

Mmmm... Pie...

I’ve been lucky enough to get my hands on one of the Raspberry Pi alpha boards. I have various plans for things to try with it, but I thought I’d post some initial thoughts about the experience of using the board, and the project as a whole.

If you’ve not heard the name before, it’s a charity that aims to “promote the study of computer science and related topics, especially at school level, and to put the fun back into learning computing”. To this end, they’re developing a $25 computer. Not a toy, or a working model, but a real computer that’s cheap enough to give to kids without worrying about them breaking it. This isn’t just pie in the sky1, either: they’ve already produced two generations of prototype hardware, and should be on course to have the final version in production, at the target price2, before the end of the year.

The board, pictured below, has at it’s heart a Broadcom system-on-a-chip based around an ARM CPU, with 128MB or 256MB of RAM stacked on top. There’s very little else on the board - the slightly more expensive version has a single-chip USB hub and Ethernet adapter, but that’s pretty much it. This simplicity is how they’ve managed to hit the ambitious price point.

Raspberry Pi Alpha Board

This kind of SoC is more often found in set-top boxes and the like, so it has reasonably good graphics and sound. It really is a complete system - you just plug a keyboard into the USB port, a TV (or monitor) into the HDMI, and you’re away.

On first booting the board, I was taken back. Not to primary school and the BBC Micro, but to my first exposure to Linux at University. The disk image I have boots to a console, and I found myself dredging up knowledge of things like runlevels and virtual consoles that I hadn’t used for years. My soft hands suitably re-calloused, I proceeded to poke around, install various packages (including, I admit, X Windows and LXDE), and generally having a play. The current OS image is based on Debian, and so hundreds of packages are only an apt-get away. The list isn’t as comprehensive as it is for x86, but there are still plenty of interesting packages (such as TightVNC) to install.

The thing that struck me as I used the Raspberry Pi was how familiar everything is. This isn’t some kind of esoteric embedded system, but a real computer, with a real OS, and standard languages and compilers right there, running on the board itself. Granted, it’ll never challenge the latest MacBook Pro in terms of raw horsepower, but for the intended use - programming education - it’s more than enough.

You could, of course, stick Firefox on the device, and get a dirt-cheap, tiny, low-power client for the web. There are also myriad things that become feasible when you can get a computer for the sort of money that Curry’s would charge for an HDMI cable not too long ago - smart screens, tiny servers, automation, and many others. You could even stick LibreOffice on it and equip a school computer lab for a fraction of the price today. However, doing so would miss the point.

The project stems in large part from the observation that fewer of the eighteen-year-olds arriving at Cambridge to read Computer Science had a good grasp off how computers actually work3. This is not, of course, to say that they’re any less bright, but just that their exposure to computers has been markedly different from that of those of use who grew up in the eighties (or even the nineties).

There are numerous factors behind this change, but a big one is the rise of the family computer. This is a device that has a myriad of uses - banking, shopping, gaming, watching TV - which means that parents are a lot less inclined to let an inquisitive seven-year-old poke around in it’s innards. A Commodore 64 or Acorn Electron, by contrast, was useful for… pretty much nothing, out of the box. Even getting a game to load involved reading the manual and getting some mysterious incantation just right.

This initial uselessness is not only part of the charm of early home computers, but also a key to their educational value. To make them do anything of interest, you had to program them at least a little, and this gave curiosity a way in. Even copy-typing listings from a magazine4 gives you the idea that, far from being some kind of magic, this box is something that could be understood if you put your mind to it.

Modern computers are increasingly black boxes, with a big implied or explicit “no user serviceable parts inside” notice discouraging people from wondering how they work. This is appropriate for tools that are increasingly central to our lives5, but raises the question of where the next generation of programmers and hardware engineers is going to come from. By providing a cheap, open machine that kids can tinker with to their heart’s content, Raspberry Pi are providing an answer. It’s not the complete solution, but it’s a big part of it. What they need now are software and ideas, and if you’re a programmer of teacher (or both) that’s something you can help with. You can also help by buying one of the final boards under their buy one, give one scheme. I’ll certainly be getting one or two.


  1. Sorry.

  2. There are actually two models (with a naming scheme that might seem familiar) - the model A for $25, and the model B for $35, which adds extra RAM, Ethernet, an additional USB port. The alpha board corresponds to the model B.

  3. Eben, one of the founders of the project, and I were both involved in interviewing prospective Computer Science undergraduates, for different colleges.

  4. Coverdisks? Cassettes? Checksums? Luxury! When I were a lad, we had copious syntax errors, and we were glad of it…

  5. This is one of the reasons I tend to buy Apple hardware these days - I’m willing to sacrifice some of the ability to upgrade and repair the kit myself for the integration and simplicity.