Tinkering, shared coding, and other techniques for teaching programming
18 September 2019
What strategies and techniques do you use to teach programming? Have you ever audited your lesson planning to see how much scaffolding you provide children with as they learn to program?
In primary classrooms, whatever lessons we are teaching, we use approaches to deliver material. For example, in literacy we might give children targeted activities, such as answering comprehension questions, fixing mistakes in sentences, or comparing and evaluating text. In D&T, we might set up lessons where children explore how examples or parts of a product work before designing a new item. What techniques do you use when teaching programming? Have you considered the balance of your approaches, and which of these options is most effective for teaching different groups of learners different concepts and skills?
Techniques to consider
Here are some ideas of techniques and approaches you could use when teaching programming:
This technique involves giving pupils a set of instructions to follow to create a program. Learners are required to follow the instructions line by line to write a program that someone else created. Materials for this could be an online teaching product or a printed set of instructions.
There are many targeted tasks that teach specific concepts or address particular misconceptions. Often such tasks are aimed at getting learners to read and understand code. An example activity is to give learners a program and ask them to summarise what the code will do, or to trace the code saying exactly what each command will make happen when it runs. In both of these scenarios, learners are predicting what code will do.
Other targeted tasks include:
- Spot the difference between code snippets
- Remix code to achieve a particular outcome
- Debug code
This method is very similar to shared writing: the teacher shows pupils not only what the finished product looks like, but also explains the making process and their thought process. This approach can be used in small groups or on a one-to-one basis, and it is also referred to as live coding.
Here learners are provided with just two or three commands that they are asked to explore. The teacher has an idea in mind of what they want the children to learn, but rather than telling them what the commands do, they ask the learners to find out. Teachers can include some questions to nudge learners along to get them to the objective of the task.
Here pupils are required to create a project of some kind. There are lots of different ways to run projects, as well as different ways to scaffold learning in projects. In literacy, some teachers follow a progression that scaffolds learning to write texts. At first, pupils read lots of examples, then they create an imitation of an example text. Next, they create a variation of the text. Finally, they get to invent a brand-new version.
In programming projects, we can do the same:
- Start with having learners use example projects
- Next, ask them to create a project that imitates a high-quality exemplar
- Then, have them make projects where they are remixing ideas, algorithms, and code examples
- The end goal is letting learners independently create a brand-new program
This development of independence might span years of different projects across different programming genres.
This techniques requires pupils to play. They are given access to a programming environment, and perhaps some hardware too, and are then asked to explore and play.
This list of approaches is by no means exhaustive, and the techniques are not necessarily separate. When running a project, you might include a little code copying to get children to accomplish one particular tricky thing, which you plan to later teach through guided exploration or targeted tasks. Or you might develop children’s curiosity and emerging understanding of a new programming language with some tinkering, before demonstrating certain features and moving on to a ‘remix’ project.
Whether you use a ready-made scheme of work or have created your own, you might find it interesting to audit your planning to see which of these approaches are included.
There is only limited research into which of these techniques are best suited for primary school pupils. Therefore, this article includes no comment on the impact or effectiveness of the approaches. Each of us has their views and experience of each method, as well as particular knowledge of the learners in our setting, which will all influence which approaches we choose to employ. If your class is not developing independence in programming projects, perhaps reflect on the techniques you are using and try a different approach.
About the author
Jane Waite, Queen Mary University of London, is a teacher trainer and researcher who works on computing education projects.