When teachers consider teaching coding in primary schools, it is easy to imagine a figure hunched over a computer entering lines of unintelligible character strings which magically become the plethora of applications, games and digital tools we all encounter in our everyday lives.
Put yourself in the computer programmer’s shoes, however, and what you are doing makes complete sense. This is the divide between the knowing and not knowing, a divide for which, in computer programming, is far wider than many other areas of expertise.
Take a cobbler for instance, no one without training could craft a beautiful pair of loafers, but we all understand the concept behind what makes a great pair of shoes. In fact, most of us could probably, in a situation where it was necessary, fashion a pair of rudimentary shoes which served the purpose of footwear. But could most of us construct a rudimentary computer program which serves a simple purpose? My guess is that the shoes would be a far easier and less daunting exercise for most of us.
An interesting fact around programming is that it existed as far back as 1206 BCE when Ismail al-Jazari, a Muslim polymath during the Islamic Golden Age, constructed automata or self operating machines, which could play different musical beats and rhythms depending on an order of pegs and cams which could be altered by the machine’s ‘programmer’. Simply put, a programmer sets a pre-defined order of events in progress for a self operating machine.
These early automata followed essentially the same processes and used the same basic concepts as today’s modern computers. IF a certain parameter occurs THEN perform a function or ELSE do this other function.
It is simple because it is the way decision making occurs in our human brains when we are infants. IF it feels yucky, THEN drop the thing, ELSE put it in your mouth. It also governs many adult decisions which don’t require higher order thinking. IF it is raining, THEN bring an umbrella, ELSE leave it at home.
Teaching Resource to Introduce Classroom Coding
Once you understand the basics, teaching coding in primary schools becomes a little easier. Our resource, Classmate Coding – Flashcards and Activities, is a perfect introduction for students (and teachers) to experience the basics of classroom coding, without even touching a computer.
That’s right folks, we’re going old school al-Jazari and ditching the computer for some hands-on, physical programming.
Well, that is after you log into Teach Starter, download the resource, and send it via wireless technology to the printer.
Unplugged coding is the term which is used most often for programming or ‘coding’ in a physical, real-world sense, rather than electronically or computer-based.
Let me draw comparisons to a simple computer task. Let’s say I want to type “Hello, World!” and have it appear on my computer screen.
- I have to give the computer input, which is me pressing the characters on a keyboard.
- The computer then runs through a series of IF, THEN and ELSE processes which result in the monitor displaying “Hello, World!”, or providing output.
The keyboard is an input device, the monitor an output device. Unplugged coding works in exactly the same way. You must give some input which is then processed and the results are a version of output.
The comparison is, lying in the sun on a tropical island sipping a mojito with the sunlight glinting off the condensation as it slowly trickles down the side of your glass, ice clinking melodically as it melts and settles (take me there) and you begin to feel the heat from the sun become a little too intense, this is input. You turn over to warm your other side, this is output. It’s a version of cause and effect.
Where unplugged coding differs from a human decision, is that the brain is not in charge of the actions, the program is.
Teaching Coding Without a Computer
Classmate Coding – Flashcards and Activities is a coding resource designed to take the students through a step by step series of activities which progressively gets harder and harder.
There are eight separate activities in four distinct stages which are put together in a way that each stage must be understood before the students can progress to the next stage.
The activity cards are accompanied by coding tiles which are as simple as ‘move forward’ and ‘turn left’ down to more complex tiles for looping and initiating programs.
Each activity involves using a combination of these coding tiles in order to complete a task, and the automaton they will be coding to complete each task is a classmate or even the teacher!
Coding Lessons for Primary Students
Coding Lesson 1
Simple Movement (card 1) is exactly what it sounds like.
This is a great beginner task as it helps to break the ice, coding a peer with tasks that are easy to grasp and complete.
- Begin by scaffolding, using a student as the coder and the teacher as the automaton.
- Pick a simple set of directional instructions, for example, trace a capital letter ‘H’ on the floor and have the student attempt to use the coding tiles (without any training in how to use them) to create a code the teacher must follow.
- Through trial and error, as well as class input, work towards a suitable solution which may look something like this:
Tip: Work it out on paper before trying it in a physical sense.
Coding Lesson 2
Making Decisions (card 2) is all about cause and effect.
The tasks on this card are all about using and manipulating the IF, THEN and ELSE coding tiles.
- The second activity on this card will have the students using all three in a combination and being able to loop or repeat a series of actions.
- The task is to code a classmate to continue walking in a straight line but turning around when they encounter an object.
The code would look something like this…
The last tile is a loop tile. It will loop a set of instructions or a ‘program’ a certain number of times (including infinity).
In this code, there is only one program so there is no need to specify a program number on the tile this time.
But with the next card, multiple programs will be required which work together.
Coding Lesson 3
Using Programs (card 3) is about making different sets of instructions work together to accomplish something.
Think of it like multitasking in order to complete a task more efficiently. A fun activity which takes up less room in the classroom is a hand/pencil coding activity.
- In their maths grid books, have the students code a loop for their pencils to observe how it affects design.
- Try the following code first as it creates a pretty design which will bring your pencil back to the starting point.
The above first program (program 1) instructs the pencil to move forward three squares and turn right.
This is the second program (program 2) and it instructs the pencil to move forward one square, turn right and move forward one square.
This is the third and final program (program 3) which calls on programs 1 and 2. This is the main program running.
Firstly it calls on program 1 to run and repeat four times. After this it calls on program 2 to run once. The final tile instructs program 3 to the run four times in total.
Coding Lesson 4
Combining Them All (card 4) is using everything from the first three cards in combination.
A scenario which you might like to model for the class would be to code a classmate turning circles in a clockwise direction until they hear a clap, at which time they would begin turning circles in an anti-clockwise direction.
This is the first program. It tells the student to continue to turn right (clockwise) indefinitely unless there is a clap. In which case program 2 will then begin. It will be simpler as there is no need for an IF, ELSE, THEN decision, the task is just repeated.
This is program 2, which will begin as soon as program 1 encounters a clap. It tells the student to begin turning left and to keep repeating this forever.
These task cards and activities will provide an excellent foundation for students in understanding the concepts of coding and how computer programs work.
With prior knowledge in these areas, when it comes time for students to work in block coding software suites like Scratch, Lightbot and even Hour of Code, they will already have the concepts down pat.