It's always very tricky when people who aren't educators start banging on about what should or shouldn't be taught in schools. My own school days are but a hazy memory of hormones, angst, and boring homework. Yet here I am, pontificating.
With the current "fad" of encouraging children to learn to code, I thought I would be worth looking at the difference between coding and computer science.
I learned the infamous Logo Turtle at school and BBC BASIC at home. That is learning to code. I followed instructions, copy-typed from books, and made minor adjustments to "personalise" my programs.
At A-Level I started studying "Decision Mathematics". Rather than esoteric calculus, and prosaic formulas, it looks at how to solve problems logically. It was the perfect primer for learning how to become a programmer and I firmly believe that no conversation about teaching coding in schools is complete without a theoretical understanding of the science behind the code.
This is an exercise I run through with people wanting to understand the basics of computer science:
Sort the following numbers:
7, 8, 1, 3, 2, 7, 6
Easy enough to do in your head, no?
Ok - explain to me how you did it?
We then talk through what we think the problem is - in what way do we want the numbers sorted? High to low? Low to high? Alphabetical? What, in fact, do we want to do with the sorted numbers?
What series of very simple instructions could we give to an absolute idiot such that they could follow them and get the right answer?
Where are the "gotchas"? If two numbers are the same, how should they be sorted? Does it matter?
Are there more or less efficient ways to sort numbers? Are there times when less efficiency is good?
Hey presto - we've begun to explore Computer Science. We can craft algorithms, learn how and why they are important, write out pseudo-code, hunt for bugs.
The above is a great introduction to Computer Science. Now let's look at what learning to code teaches people.
sort([7, 8, 1, 3, 2, 7, 6]);
var numbers = [7, 8, 1, 3, 2, 7, 6]; numbers.sort();
What has that taught anyone? Merely syntax.
I learned the BASIC and Pascal languages at school. Who uses those now? No one. Learning to code an iPhone or Android app is great fun - but in 10 years time when those children are adults, the world will have moved on and Objective C will be yet another obsolete language.
Yes, learning the rudiments of one language can be helpful in picking up another - but it's no substitute for understanding the fundamentals of why you are doing something.
That's why I'm a big supporter of the Apps For Good initiative. Rather than just teaching kids how to build an Android app, it takes them through the process of design, user research, competitor analysis, testing, monetizing, building a team, and legal / social ramifications of releasing an app. All of which are vital tools to any would-be programmer.
It's not just about learning which buttons to press in order to make an app - it's about a deeper understanding.
Let's put it in language the humanities graduates can understand.
Learning to code is merely teaching people to spell.
Computer Science is about what makes a poem beautiful, why alliteration is alluring, how iambic pentameter unlocks the secrets of Shakespeare.
That is what I think we need to be teaching.