Programming

What is programming?

Programming is the process of designing and writing a set of instructions (a program) for a computer in a language it can understand. This can be simple, such as a program making a robot toy trace out a square, or incredibly sophisticated, such as those behind search engines and weather forecasting.

Programming is a two-step process:

  • First, you need to analyse the problem and design a solution, drawing on logical reasoning, decomposition, abstraction, patterns and algorithms.
  • Secondly, you need to express these ideas in a particular programming language on a computer. This is called coding, referring to the set of instructions that make up the program, which we call ‘code'

We can only write code using the clearly defined grammar and vocabulary of a programming language, but the terms used are typically taken from English. So, a programming language is something we can understand and which the computer can translate into “machine code” – the instructions which run directly on silicon chips.

An example of a block of Scratch code.

An example of Scratch code.

Why is programming important?

Most people use smartphones and PCs daily. We’re surrounded by digital technology, but there’s a difference between knowing how to use the programs and understanding how they work. It seems inevitable that the amount of technology around us – and our reliance upon it – will continue to increase. It’s therefore imperative that pupils’ education equips them with an understanding of these systems and, potentially, the ability to adapt or develop systems themselves. Programming provides the motivation for learning computer science: there’s a great sense of achievement when a computer does just what you ask. In Douglas Rushkoff’s words: “Program or be programmed.”

What does programming look like in the Primary curriculum?

Computational thinking and coding are best taught hand in hand. Imagine teaching the principles of chemistry without doing experiments – or doing experiments without covering the underlying principles. Whilst programming is an important part of the curriculum for computing, it would be wrong to see it as an end in itself. Rather, it’s through the practical experience of programming that the insights of computational thinking can best be developed. Computational thinking has wide applications across various disciplines, but it’s most obviously apparent – and probably most effectively learned – in the rigorous, creative processes of writing code.

One of the aims of the national curriculum for computing is that pupils can analyse problems in computational terms, and gain repeated practical experience of writing computer programs in order to solve problems. Many programming languages are more complex than necessary for those just getting started, but there are plenty of languages which can be used very effectively in the Primary classroom. The language type can progress from being device-specific in Early Years (e.g. Bee-Bot, Roamer-Too), through limited-instruction in Key Stage 1 (e.g. ScratchJr, Lightbot), to game-programming, block-based and text-based in Key Stage 2 (e.g. Kodu, Scratch Logo, TouchDevelop). Here are some points to consider when choosing a programming language:

  • Not all programming languages run on all computer systems.
  • Choose a language that’s readily accessible to your pupils.
  • Choose a language well-supported by good learning resources and online communities.
  • It’s beneficial if pupils can continue working in the language on home PCs.
  • It’s even better if pupils can access a school project from home via the internet.

A photo of a Bee-Bot, and images of blocks of code in different programming languages.

A selection of programming languages: Bee-Bot (device-specific), SratchJr, Kodu, Scratch and Logo.

3 - 5 years

Pupils can explore in roleplay how programmable devices work, such as washing machines and mobile phones. You might model simple problem-solving skills; for example:

  • What’s the problem? “I need to wash some clothes.”
  • How can the problem be solved? “I can use the washing machine.”
  • How can this device be programmed? “Let’s turn the dial to the short-wash function, select the amount of time for the wash and then press the Start button.”
  • Has the solution worked? (i.e. debugging.) “Do my clothes look clean? Oh dear no! Let’s go for a longer wash.”

Pupils could tinker with programmable toys like Bee-Bots, Roamer® and BigTrack, finding out about the specific programming language which controls each one. What do the buttons do? What if they’re pressed in a different order? How might a route be navigated? Ask the pupils to think about how to solve a challenge, pressing combinations of buttons and debugging as they go along. They’re programming! In an example of an “unplugged” activity, pupils might ‘program’ a friend who must act as a robot, following their given instructions exactly. This is an exercise which soon illustrates how precise successful algorithms and programs must be.