School-level non-vocational education is slightly further removed from the job-seeking concerns of students, but it still has similar tensions. Even the most principled of subjects can slowly change over time. English grammar slowly evolves, and schools can get caught teaching old principles (e.g. forbidding students to ever split an infinitive). Maths slowly moves on: why do we still teach long division when no-one would ever use it in real-life?
Programming is an interesting example of a field that is moving forwards all the time — how can educators pitch the level correctly to avoid chasing the latest fad, while not being left behind, teaching outdated topics?
I think there are two main reasons that school-level programming education is in danger of teaching outdated items. Firstly, there is little funding or time for teachers to update their knowledge, so many teachers will therefore tend to stick with teaching what they learnt themselves (which may be many years before). Secondly, over time programming over time tends to grow more complicated, so older content is often simpler content, and thus more suitable for teaching. But I wonder if there is a danger of falling into the trap of the man searching beneath the lamp-post for his keys because that is where the light is: is there a risk of teaching what is easy to teach, rather than what is useful? A good example of this is binary, which I believe is no longer much use outside hardware — but it’s well understood how to teach binary, it’s achievable for school pupils and somewhat fun, so we keep on putting it on exam syllabuses.
Laura Dixon’s recent post made me think about these issues again. In summary, the OCR AS-Level syllabus has a few items that are problematic to teach in Python, such as repeat-until loops and arrays. Repeat-until loops are pretty much dead in modern programming — so much so that Python omits them. That’s a fairly small issue, but an example of the sort of problem that can arise. Arrays are still in Python, but most (non-C) programming has moved on to things like collection classes in Java, or list types in things like Python and Haskell. But arrays fit very well educationally with other topics of that level: using an integer counter to loop through array indexes works well with topics such as loops and integer variables. Nice to teach, but generally outdated in modern programming (where for-each loops or higher-order functions like map are the order of the day).
I’m not saying that this means we shouldn’t teach arrays, just that there is a clear tension between teaching considerations, and modern programming practice. Another example, which briefly crops up in the OCR spec, is ASCII. ASCII is dying, replaced mostly by its vastly more complicated superset, UTF-8. But UTF-8 would be crazy to teach in full, with all its byte-stuffing practices that mean different characters take different numbers of bytes, and all the combining characters and normalisation and so on. ASCII has the fundamental idea of characters-as-numbers, which is a useful (and timeless) principle, even if the exact encoding itself is getting more complicated.
Programming paradigm is also another interesting choice. In the late 80s, procedural programming was predominant. Languages like C were ascendant in industry. Pascal was a great educational mirror of the status quo: an easy-to-teach procedural language, covering the most important topics such as if-then, loops, records and subroutines (and Pascal even saw some use in industry). By the mid 2000s, object-oriented programming had won: C was still around, but C++ and Java were the new thing, and Microsoft were responding with C#. Universities did respond to this: Java became the new top teaching language at universities (and still is). Right now, functional aspects are on the rise. It is not necessarily purely-functional languages — instead, languages such as Python, Ruby, C#, and even slow-moving Java, are adding in concepts such as higher-order functions, first-class functions (or closures, or similar).
So where should school teaching pitch its tent? Should it stick with traditional procedural programming — or should it include some object-orientation, or even some functional programming? There is a tension: a temptation to catch up to the modern world of programming. You’re dead if you’re not functional in 2013! But I think it is worth remembering that the educational pipeline for a modern UK professional — for better or for worse — involves school until 18 and three years of degree afterwards. We don’t expect school children at 16 (or even 18) to know enough maths to move into disciplines (e.g. actuarial work) that involve mathematical knowledge, so is it reasonable to think that school children at 16 should be able to go straight into being professional programmers? If we do succeed in getting computing back into schools, a long-term challenge will be trying to organise computer science education into a cohesive pipeline, like maths, that avoids repetition and builds to a useful, relatively timeless, conclusion.