Teaching Programming

15 May, 2014

The second aim of the new Computing curriculum is ‘can analyse problems in computational terms, and have repeated practical experience of writing computer programs in order to solve such problems.’ In the subject content for KS2 we find ‘design, write and debug programs that accomplish specific goals’. Clearly computational thinking through programming is an important strand of the new computing curriculum. In this article I want to set out why I think every primary school in the Country should be using Scratch, how it can be introduced and the benefits of using it.

What is Scratch?

Scratch is a free, open ended programming language developed by the Massachusetts Institute of Technology to help children understand computational ideas by programming a wide variety of projects.  It has been used by millions of children worldwide and it is now in its 11th year of development.

Open ended environments

When choosing a main programming environment it is important to choose one that can grow with your pupils and is open ended rather than closed. Choose one where they can learn from others not just you. Scratch is fantastic for this with its excellent online portal. Between the ages of 7-14 pupils can progress from Scratch 1.4 into 2.0 and then onto Scratch ports like Snap. You can even have different pupils using different versions in the same class depending on need. Be wary of expensive products that offer to solve the ‘Computing problem’ by dumbing down and limiting what can be achieved. What you probably need is good CPD.

Teachers need training

Many years ago I downloaded Scratch and did what I do with most programs, tried to make sense of it through trial and error. After an hour or so I gave up. I had no understanding of the underlying principles of sequence, repetition, selection or how a variable could be used. Pure trial and error left me frustrated and alienated from this wonderful programming tool. I wonder how many other teachers have had similar experiences. Training unlocks these ideas and the realisation that every digital device uses these constructs. Computing training has the added benefit that the underlying principles haven’t changed so knowledge gained is

Start simple with everyone

These days I start with very simple programming projects for all KS2 pupils. You wouldn’t expect a pupil to understand or use long multiplication without understanding of a number system in place.  My early projects (Smoking Car, Music Machine & Dressing Up Game) link very simple key board inputs or mouse clicks to a single command or simple sequence. Promoting the idea that we can decide what each key does and that the programmer is in control of what the program does. I demonstrate how to connect these and then pupils copy the blocks and test their code. Lots of pupils finish quickly and I then give them specific challenges which use the same type of blocks to do something similar but where I haven’t shown them the solution. They love this! If you have time, projects where pupils re-purpose similar code work well. After our music machine I encourage them to make their own instruments. This also makes a good assessment opportunity.

Link new computational ideas to real world examples

When we encounter selection for the first time I relate this to real world examples inside the Scratch blocks. Examples such as if it rains you will get wet are not perfect but relate existing knowledge to new. Before the selection parts of the Maths quiz I use these examples. When we encounter a repeat x times loop for the first time I get pupils dancing steps. Breaking a popular dance into its basic elements and then choosing notation for each element. Pupils can then design dances for each other combining notation with number of times to use, which is a repeat x number loop in the real world. We then take this knowledge straight back into Scratch.

Run through more complex code examples line by line before demonstrating code

If modelling a program that uses variables, I use a box(s) and pencils/post it notes (depending on context) and go through the code line by line. I do this with lots of programs that include variables. If you just run the code it runs too quickly to see what has really happened. I always get pupils to help me. You can also get pupils to demo their ideas for code by modelling it to you or their peers especially if you know that writing it down will take too long.

Multiple coding opportunities

Don’t fall into the trap of thinking that as you have used selection in one program that you have covered this. This is like using addition once and then thinking that you don’t need to use it again. Selection, repetition, variables are constructs you could take a lifetime to learn how to manipulate. Pupils need multiple opportunities to use and experiment with these ideas. The new English Computing program of study talks about, “repeated practical experience of writing computer programs” in the aims, let us work towards this.

Computing is a fantastic tool for proving Maths concepts

In response to one of my schools need to improve their maths results I started writing Scratch modules which worked with Maths concepts. We have investigated counting using a number machine, perimeter after revising greater than and less than. Created programs to calculate the angles of 2D shapes, programs to calculate what coins our change could be given in and much more. I feel I have only scratched (pardon the pun) the surface of what is possible. I though pupils would revolt over creating these rather than games so was really surprised when we had visitors from the press and they choose to show these programs. In the long run you will reap real maths benefits from choosing programming environments that are open ended.


There is a wider economic reason for realigning our curriculum towards computer science but important as that might be for the country, for my learners this is all about challenge. Programming is challenging and hard. At the CAS Wessex Workshop Miles Berry described it as ‘struggle ware’. This is an apt description. I can honestly say that in the last two years the learning opportunities and degree of challenge that I have provided have far exceeded anything I have taught in ICT over the previous 20 years. I have really enjoyed seeing pupils rise to the challenge.

0 thoughts on “Teaching Programming

    • Hi, thanks for your comment. We have been working on new articles and so there will be plenty of new ones coming this term. Have no fear, they will be up-to-date and relevant. Keep checking back to make sure you don’t miss them! Many thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *