Phil Bagge, actively involved in the Computing curriculum, shares with Staffroom some practical advice for teaching programming in schools.
The second aim of the Computing curriculum is that pupils ‘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 challenge the accepted wisdom about what makes an Outstanding primary programming lesson.
Debugging is the skill of finding programming faults. It involves understanding that making mistakes and learning from them is a normal part of programming. Implicit in this is the acceptance that it is not the teacher’s job to fix pupils’ code. In fact, to do so invites dependence on the teacher. Bearing this in mind, a good programming lesson will see the teacher establishing ways for pupils to fix problems themselves.
In the early stages with block-based programming, such as Scratch, this might involve encouraging them to compare their code with the teacher’s example or a friend’s. It may also involve encouraging pupils to try and identify the specific problem area by reading the blocks and seeing if the narrative makes sense. With text-based programming languages it may involve checking through a list of common faults before asking for more help.
The first job of the teacher is to help pupils fix errors themselves. In my experience, many teachers find this very difficult and need to restrain themselves in this area. It is better to stand back as a teacher in a programming lesson than undermine pupils’ independence through intervening.
All programmers at whatever level accept that their first attempts at an algorithm or programming solution may be incorrect; indeed, it is the struggle to develop a working solution that is intriguing and intellectually satisfying.
While it is good for pupils to solve programming challenges in a lesson, teachers shouldn’t be afraid to leave threads of challenge unsolved. These extra hooks can intrigue some pupils and inspire them to work on solutions in their own time. An Outstanding programming lesson will have appropriate levels of struggle and, wherever possible, unfinished elements or unanswered questions to intrigue.
Equally challenging for girls and boys
When I started primary programming, I read an excellent post by the CAS Include group about how some male teachers would refuse to fix boys’ programming problems, but when faced with girls struggling with the same issues they would provide solutions.
I read this with a certain amount of smugness, confident that I would never be guilty of such inherent sexism. However, at a programming club that very afternoon I spotted myself challenging a group of boys who wanted me to fix their programming project to find the solution themselves and then giving a fully-formed solution to a similar issue to a group of girls not six metres away. I was horrified that these 1950s attitudes still prevailed in my practice. I have had to train myself out of doing this, and the first step was recognising I was doing it. I now have more girls attending coding clubs and everyone is equally challenged and allowed to struggle.
Maths is anticipated, embraced and expanded on when encountered
Programming is a wonderful way to prove that Maths concepts work in the real world. Whether it is decimal fractions, angles, co-ordinates or any other area of Maths, Maths interaction needs to be anticipated and prepared for in an excellent programming lesson.
For example, if using decimal fractions to reduce the speed of movement of a sprite in Scratch, a pre-drawn line split into tenths can help illustrate the point. Pupils don’t need to understand every aspect of Maths to use it; however, a good programming lesson will add another layer to their Maths understanding.
Teachers who learn alongside their pupils
Programming is wonderfully open-ended. I have found over the last few years that pupils are capable of coming up with better solutions than mine on many occasions. I am not the fount of all knowledge; I am a fellow traveller on the road towards understanding.
In a good programming lesson pupils know that their contributions are valued and that the accepted perceived solution can be changed or added to by their contribution, and celebrated by their teacher and peers.
Procedures to deal with latecomers or absent pupils
Many pupils in primary classes are rushed out for booster lessons. Some form of device to help them catch up helps them to feel valued and prevents them falling further behind. I use ‘catch-up cards’ to help them fill in code they have missed. They won’t have as much understanding as those who have fully participated in all of the lessons, but their programs will work. This prevents them feeling stigmatised through never finishing anything. SR
Images ©2014 Phil Bagge. Used with kind permission.