It will have been hard to miss the changes afoot in the move from ICT in the old national curriculum to computing in the new version, coming into effect in September. We’ve seen lots of headlines about how children will be ‘learning to code’ from the age of five, and a number of great initiatives such as Code Club, Code Club Pro, Year of Code, Hour of Code, Codecademy and Decoded which aim, amongst other things, to give children and their teachers the opportunity to learn to write ‘computer code’. This really is great, but you’d be forgiven for thinking that ‘coding’ is all there is to the new programmes of study; this is far from the case – ‘code’ and ‘coding’ aren’t mentioned at all! What we do have is a mix (I’d now say a balanced mix, but others would disagree) between computer science (CS), information technology (IT) and digital literacy, or the foundations, applications and implications of the discipline. There’s much more to computing than computer science, and there’s much more to computer science than coding.
Rather than making reference to ‘coding’, the new programmes talk instead about ‘programming’, and it’s worth thinking a bit more about these two related, but not entirely synonymous terms. Both coding and programming are about getting the computer to do things. They’re about giving it instructions to follow, and getting something, ideally something useful, , done.
Coding involves creating a set of instructions, rules or a description in a formal language which the computer can interpret, to achieve a particular objective. There are plenty of choices for the formal language – Scratch is a lovely, visual introduction, ideal for KS2; HTML is the language of the web; Python seems to be the front runner as a text based programming language for KS3, and even good old Excel, despite Mr Gove’s criticisms of it, is jolly useful for describing and solving all sorts of real world problems as well as a good introduction to functional programming.
Programming involves computation, ie performing calculations or processing information or otherwise changing input into output according to a set of rules. This is obviously going to involve coding, how else would the computer be able to do this computation? It’s also going to involve some creative thinking though – the programmer needs to work out how to solve the problem or model the system as well as expressing this as computer code. The ‘how’ here is the algorithm – it’s the ideas, expressed as s sequence of steps or a set of rules, for getting something done, which then gets expressed as code on whatever computer and in whatever programming language we happen to be using.
For me, then, programming = algorithms + coding
Ie, programming is itself a two step process.
In programming, we start by thinking. We think through the algorithms for how to solve a problem – breaking this down into parts, and then breaking the parts down further into sequences of steps or sets of rules; we capture the essence of the problem or system and leave irrelevant detail to the side. We can jot these down as ‘pseudocode’, sketch ideas on a whiteboard, wireframe the states and behaviours of our apps, or go old school and draw some flowcharts. This is creative work! For many problems there are many possible algorithms – some will be better than others, and part of the challenge and joy of CS is about finding better algorithms for solving a problem (compare ‘is it 1? is it 2? is it 3?’ etc with ‘is it less than 500? is it less than 250? is it less than 375?’ etc for guessing a number between 1 and 1000).
Expressing these algorithms in the formal language of code is also highly creative work, but also very technical work, demanding a detailed knowledge of the semantics (the vocabulary) and syntax (the spelling, punctuation and grammar) of the programming language you’re working in. Learning a programming language isn’t something which always comes easily, but toolkits like Scratch make it as easy as possible, as the vocab is all there to see and the SPaG is taken care of through the programming building blocks. The challenge for many in moving from visual languages like Scratch to text based languages like Python is about mastering the semantics and the syntax when these scaffolds are removed, but it’s undoubtably easier to master a second programming language than a first. That apart, it’s in the coding where most of the power and the fun of programming comes – being able to get a computer, or a robot, to put your ideas into action is a great ‘wow!’ moment for many, and the frustrations of getting code to work as it should help develop tenacity and perseverance, with much in common with training for a sport, practising an instrument or playing a great computer game.
I suppose sne analogy is that of writing and translating poetry – both are creative processes, but the former is much more in the realm of ideas and structure, the latter demanding an excellent knowledge of the vocabulary and grammar of the target language. Or perhaps the relationship between algorithms and coding is that between composing a theme and expressing this as an orchestral score?
The thing is, you can have one without the other: ie, you can separate algorithms from code, and there are circumstances in which it’s sensible to do so. For example KS1 of the new computing curriculum requires that pupils are taught to ‘understand what algorithms are’. Developing this understanding can be done well, away from any computers – having children follow instructions to draw shapes, or move from place to place, or to get ready for lunch is a good starting place, and then moving on to children writing their own algorithms, or recipes, for jam sandwiches or pizzas: much of this already happens in infant classes; all we need do is make this explicit.
HTML, the language in which the web is written, is a great example of code without algorithms – there’s no way for HTML on its own to perform even simple computation, but it’s a great way to describe the structure and content of an online document. Teaching pupils to code HTML by hand, whilst not explicity required in the programmes of study, is well worth doing: with the web increasingly the default medium for writing and media, an understanding of how web pages are put together is both useful and interesting. Writing HTML is also a great introduction to text based coding, without the additional cognitive load of having to worry about algorithms.
I do think Code Club, Year of Code et al are right to focus on ‘coding’, as this is more immediately engaging for pupils than the more abstract ideas of CS, but I’m also glad that the programmes of study go beyond this, otherwise we might be at risk of replacing one set of IT skills with merely another set of coding skills.
To be fair though, I think when most folk talk about ‘coding’ they’re actually talking about something closer to ‘programming’ – most, if not all, of the lovely initiatives I mention above, and many others, are rightly concerned about the algorithmic ideas as well as their formal expression in code. Just as I’d be a bit concerned about any units of work that focus on the mechanics of coding without drawing on the ideas of algorithms, I’d also worry about too much emphasis, certainly in primary school, on algorithms without the chance to code up a program to put these into action. I do see great benefit in an ‘unplugged‘ approach to some CS ideas, but trying to teach ‘computational thinking’ without any actual coding is likely to be as effective, efficient and fun as teaching the scientific method without doing any experiments.
A slightly longer, less well edited version of my opinion piece for the TES. Reproduced here with permission.Share