Teaching Programming to Children (the current UK Status)

October 17th, 2013 by Posted in Education, Essays, Technology
Note: I actually originally wrote this article as an essay submission to my Tutor at Oxford, but I’m passionate enough about the subject, and just about happy enough with this article to post it online. It was originally titled “How should programming be taught to school children?” Also as an aside, I have actually had lunch with Simon Peyton-Jones previously, and he probably has a large part to play in my enthusiasm for this subject.

Teaching programming, and more generally computing, at the primary and secondary school level is something the UK is yet to get right. There is little doubt that the general consensus of the public is that more coding needs to be taught to students of all ages (a 2012 Poll by the guardian showed that 93% of those asked thought this). Other countries in Europe are making great strides with this; Estonia, for example, have reached a stage where 100% of publicly educated students will learn how to code.

The majority of secondary schools teach I.C.T. (Information and Communication Technology) as a compulsory subject, and nothing more; but I.C.T is not Computer Science, just the same as Numeracy is not Mathematics. Computer Science is a discipline, but is not thought of in that way at schools. Students and teachers are taught to be consumers, use existing software to perform tasks (e.g. Microsoft Office, Web Browsers, Mobile Phone Apps), and are not taught about the technology and mathematics that underpins the hardware and software that they take for granted each day.

As a result of this, and the fact that in our current society, these skills come naturally to children, they quickly find the course boring, and fewer and fewer are being attracted to going into the field of computer science / technology later on. Those who get as far as applying to university for a computer science degree tend to be those who were lucky enough to discover, of their own accord, the wider field that is computer science, and escaped the bounds of their limited I.C.T education. These students get to this stage in spite of not because of their school education.

Gone are the days of the BBC Micro where many children were given the right exposure to programming, and fell in love with the endless possibilities. Things need to change; Computer Science needs to be re-born, and needs new exposure in the UK education system right from the start, from primary school.

Fortunately, these thoughts are spreading: more and more important people and companies are getting involved, and not just in the UK, but in the USA, where the situation is much the same. Global innovations like code.org and codeacademy.com are pushing for this to change, and in the UK we have codeclub.org.uk and a new grass roots organisation called Computing at School (CAS) which has had tremendous success. They have been heading the design of a brand new National Curriculum for Computer Science which will go ahead in September 2014.

“The new National Curriculum establishes computer science as a core discipline that every child will learn from primary school onwards. This is a huge change, and we need the help of professional software developers everywhere to support, encourage, and equip our Computing teachers with the confidence, knowledge and skills they need to deliver the new curriculum.” – Simon Peyton Jones

Like any discipline, teaching children needs to be radically different to teaching adults. Depending on their age, lessons may need to be fun and creative to ensure that the children remain engaged and do not become bored. However, possibly more so than other subjects, as you progress through learning, you can receive immediate feedback, and take advantage of your new knowledge instantly, particularly for small steps. For example, if a child is creating a game, and learns how to use a variable to move a sprite across the screen at a particular speed, they can instantly change that variable to a different value and see how it affects the sprite. It is this curiosity, experimentation and this want to create things that drives many of today’s people in the field to start in the first place.

A very successful project to try and introduce children to programming is Scratch, a software project and online community by researchers at MIT. The scratch software has a graphical interface with a “stage” area and a “scripts” area. The stage area is a virtual screen where you can place sprites and control them. When something in the stage area is selected, you can create scripts for it by dragging blocks into the scripts area and connecting these blocks together.

The blocks style of writing scripts is extremely intuitive, and as Scratch is designed for 8-16 year olds, kids are able to pick it up extremely well. It introduces ideas like loops, functions, variables and event listeners, without ever having to introduce code syntax, understand classes, or worry about compiler errors. It is an excellent abstraction to programming languages in general. Scratch also comes with an extensive library of sprites, images and sounds, so children are able to easily use their imagination, creativity and curiosity to challenge and extend their own logical abilities and programming skills. Keeping children entertained and engaged when teaching Scratch is not difficult.

Of course, Scratch is in a sand-boxed environment: the user only gets a small “stage” area to play around with, and naturally at some point, children will each want to explore different mediums and devices which they can program.

One medium that is suggested quite frequently is the Raspberry Pi, a budget credit-card sized computer designed specifically for computer science education (although granted, it has found its way into almost every corner of the Tech industry). It is designed to run Linux, and you can download a “New Out Of Box Software” (NOOBS) package which will be booted into on the Pi and includes various Pi-Optimised Linux distributions.

The Raspberry Pi is an exposed board, (i.e. doesn’t, by default, come in a case) and has exposed GPIO (General Purpose Input/Output) pins on the board that allow you to connect various peripherals or components to it, for example: motors, speakers, LCD displays, or another board with LEDs. The Raspberry Pi is not just a computer, it is a device that you can program to control an endless list of physical “things”. In addition, the fact that they are exposed, and that children can “see the inner workings” of the devices, or just inspect them, seems to help significantly with getting them excited about using them.

Like Scratch, the Raspberry Pi has had a lot of success in the education industry. In addition, some of the Linux distributions included with “NOOBS” have Scratch pre-installed, and even better, there is a scratch software plug-in that allows you to control the Pi’s GPIO Pins from within scratch programs, so within the comfort of scratch, you can control almost any physical device connected to the raspberry pi.

A language which seems to be quite popular among teachers, and among raspberry pi users is Python. It is frequently used as the next stepping stone after learning Scratch. Python is a particularly easy to learn programming language, with a clean syntax, and indentation used to indicate code blocks rather than curly braces (this somewhat forces the code to look cleaner). There are also a plethora of libraries, both in the standard library, and in Python’s Package Index (PyPi), that make most tasks significantly easier, including a large number exclusively for the Raspberry Pi, and even for specific GPIO accessories.

Scratch, the Raspberry Pi and Python certainly provide a solid set of tools to help introduce programming to anyone from age 8 right up until the end of 6th form, and indeed, python is not only an educational language, but is used extensively in industry as well. It is also quite easy to translate concepts, algorithms, control flow techniques and just programming skills in general from Scratch’s block “script” creator, to python as well; hence providing a natural progression from no coding experience to proficient python programmer.

There are a large number of resources online for teaching school children, in particular class plans and hand-outs, and a large number of them are tailored for Scratch, the Raspberry Pi, Python, or a combination of these (For examples, see the codeclub.org.uk website or the CAS Resources). It would seem that with regards to the tools that have proved successful when it comes to teaching children, extensive research and trials have already been done; further, it appears there is a general consensus among teachers that have been involved in these first steps in educating the next generation, that these tools are more than appropriate to introduce and excite children with the field of computer science. In addition, the brand new 2014 curriculum should, for the most part, solve these problems we have.

The only major task that seems to be left is educating, supporting and encouraging existing I.C.T teachers to teach the new curriculum, and to encourage more people to go into teaching Computer Science at school. It is up to people currently in the I.T. industry, and in Academia, to do so.