According to the WordPress summary of my site, the most popular post in 2014 was “Should You Learn to Code?”, beating out the perennial favorite “The Single-Vendor Commercial Open Source Business Model”. Obviously, the broader the interest, the more readers.

This morning I read about the call by a German politician to introduce mandatory programming courses into elementary (primary) school. The idea is that being able to program is such a basic culture technique these days that kids should learn it early on.

Should children learn to code (at school)?

In my prior piece on learning to code, I answered mostly in the negative. If you are an adult and don’t aim for a career in programming, don’t bother. With children, the story is quite different: I agree that children should learn to program, but as a boost to early acquisition of abstraction skills, and not for programming skills in themselves.

Let me explain.

When programming, a programmer balances two things in his or her mind: A program and how this program will behave when executed. Imagine a car engine, both as an abstract model, and as manufactured for a particular model of cars, of which there may be many. The engineers develop the car engine as a model, trying to predict precisely how it will behave once it becomes real in a particular car.

That’s what programmers do when writing a program (engineering a car engine model by comparison) and running a program (examining the behavior of a real running engine). The main difference between car engineers and programmers is that feedback for the engineers may take weeks, months, and years, while programmers tend go get it at the click of a button.

How a model becomes real

The program (as a model, code) and the executed program (its behavior) show itself in computer science in many ways. It can be a structured program and executed application. It can be the object-oriented class and its instances. It can be a macro and its execution. It is the difference between a model and its instances, between the abstraction and how the abstraction becomes real in many forms and guises, all of which should conform to the abstraction.

Learning to program teachings children basic abstraction skills. They learn to distinguish between general principles and their application. Programming prepares students for science. When learning to program, children acquire these abstraction skills in a feedback loop that is as immediate as it gets. Either the program does what it is supposed to do or not. Feedback is relentless and unforegiving.

General principles and their abstraction

Abstraction skills are needed everywhere, obviously, not just in programming. Within computer science, product managers also need these skills even though they are not programming. Any scientist needs these skills, as science is about the invention of models (of something) and the validation of these models against how they behave (prediction, repetition, see definitions of science).

Children at school learn similar abilities in math, however, in math, the only feedback comes from the teacher. It typically comes late and not very often. Moreover, the world of mathematics is far removed from our daily routines, at least once you make it beyond basic arithmetic. It is a poor model of reality, because it has no notion of object identity. All you ever do is interpret mathematical equations, if ever, into a highly selected set of attributes from objects of reality.

The lack of a fruitful feedback loop

Children at school also learn similar abilities in their German classes, reading books, interpreting what they read, writing essays. There is also abstraction going on, but like in math, feedback is slow and rare and above all, willful. Rarely are there clear results, everyone in the end is left to their own interpretations.

Worse (than math), there is no completeness. You just pick an aspect and you have no idea whether what you discuss completely covers the phenomenon at hand. Turn a corner and you’ll get contradicting evidence, further reducing the effects of a fruitful feedback loop.

Rich interaction to accelerate the learning process

Only in the interaction with computers and programming do children learn to cover all their bases, think through all angles (they can get to), and receive feedback fast and furious that accelerates their learning process. On the downside, in order to achieve this virtuous cycle, computers naturally imply a reductionist world-view.

Thus for a comprehensive education, it is important to counterbalance it with situations and learning in ambiguity. Still, programming should get a more prominent position in teaching to boost childrens’ abstraction skills and get them ready for science.

Disclaimer: I’m a professor of computer science speaking from personal observations of many good and bad students. I’m not an educational researcher.