Category Archives: Programming

Should We Mind the ‘Reality Gap’?

It’s generally accepted that making education ‘relevant’ is a good thing for the classroom.  Usually, this means finding practical applications for theory.  But how much of a problem is it when our ‘real world’ examples aren’t as ‘real’ as they might appear?  How important is the ‘Reality Gap’?

A universal complaint of students, whether at school, college or university, is that they often don’t see the relevance of some of the material they study.  “When am I going to be doing this in a real job?” is a typical question.  There are three broad categories of response from the teacher; bluntly and clumsily characterised as follows:

  1. “You’re getting an education that shows your capability at this level.  The content doesn’t matter.  You’ll be trained to do a particular job when you’ve got one.”
  2. “You might only use about 10% of what you’re learning now in the real world but you don’t know which 10% it’s going to be and your 10% will be different to everyone else’s 10% so we have to do all this stuff.”
  3. “Well, here’s an example of how this might be used in the real world.”

(A good teacher would add a considerable degree of finesse to these answers, of course.)  Ignoring the merits and demerits of 1 and 2 entirely, how best to achieve 3 presents some interesting challenges because, much as we might like to pretend otherwise, the real world is a terribly complicated place, in which the textbook usually only gets us so far … Continue reading


A Christmas Cracker Algorithm!

T’is the season to be jolly … and silly.  So here’s a seasonal and jolly silly example of why it’s hard to implement high-level languages efficiently.  Liberties are taken with the hardware/software relationship in some parts of the analogy but, hey, it’s Christmas!

Let’s write an algorithm for pulling a Christmas cracker …

  • Buy a box of crackers and bring home
  • Take a cracker out of the box
  • Get two people to hold an end each
  • Pull in opposite directions
  • Have fun with what’s inside
  • Clear up the mess

That’s probably going to be enough detail for most people (and more than enough for some).  However, if you’re the one that’s been entrusted with the initial purchase or the child told to do the clearing up, you might want a bit more to go on; what’s actually involved in that bit?  And who are the ‘two people’ anyway?  OK then, if needed, we can easily expand this a touch …

Continue reading


Restarting Computing in UK Schools

A somewhat more down-to-earth post, this one; an overview of, and a case study in, the wonderful revolution in Computing and Computer Science currently taking place in British schools.  Adapted from a paper presented at the 4th World Conference on Learning, Teaching and Educational Leadership and published in the Elsevier ‘Procedia – Social and Behavioral Sciences’ journal.

The past few years have been challenging ones for Computing education in the UK.  After decades of national neglect, largely overlooked, from the county that invented Computer Science, there has been a sudden impetus to reintroduce computational problem-solving into the school curriculum.  Immediate obstacles include a generation of children with no CS background and a need for tens of thousands of new or retrained teachers.  The Computing At School (CAS) movement has been instrumental in this quantum transition from an IT to Computing syllabus, as have the British Computer Society (BCS), leading UK university CS departments and a number of major international technology companies.  This piece looks at the background to this position and the progress being made to address these challenges.  It describes, as an example of many, the work of the BCS-funded Glyndŵr University ‘Turing Project’ in introducing Welsh high-school students and staff to high-level programming and ‘computational thinking’.  The Turing Project uses an innovative combination of Lego NXT Mindstorm robots, Raspberry Pi computers and PicoBoard hardware together with the Robot C and Scratch programming platforms. Continue reading


An Alternative to “Hello world!”

There’s an appreciable risk that this post may be considered sacrilegious within the programming world.  If there’s one thing, even  just one tiny, single thing, that every programmer knows about teaching programming, it’s that the first lesson should be how to output the string, “Hello world!”  (There’s some dispute as to whether the ‘w’ should be capitalised but the ‘!’ is entirely necessary.)  How heretical would it be to suggest that, not only is this probably not the best place to start, but that a better alternative can be found by turning around a bottle of shampoo?

ShampooBottle Continue reading