What does coding in school actually look like?

image1

From the outside, it is easy to think that the push toward coding is going to create a generation of children who can manipulate code like an elite hacker in a Hollywood film.  Sadly, this is not quite the case.  Most children at Primary school level will only experience visual languages such as Scratch and Kodu.  The more able, gifted and talented may dip their toes into elements of Python, JavaScript or html, but it will be a light touch approach.

With coding, there is more than meets the eye.  It is easy to assume children can jump straight into creating their complex games and programs.  However, before they can, there are certain skills that pupils need to learn:

Algorithm design:  

image2

Children must know what an algorithm is and begin to create their own to achieve simple tasks.    Whether this is assembling blocks in Scratch, selecting logical code statements in Kodu or if they are feeling brave, writing their own instruction in Logo.

Debugging:

image3

Alongside this, children must be taught to debug their algorithms when the outcome is different from what was expected.  This is an excellent way for children to demonstrate a knowledge of what each part of their algorithm should achieve.  This is the computing equivalent of checking a piece of writing when complete and making changes to ensure it best achieves the brief set.

Repeats:

image4

Repeats are essential in ensuring algorithms as efficient as possible.  Repeats allow for sections of code that need to be used over and over again to be assimilated in to a much shorter and therefor efficient algorithm.  This is particularly useful in Scratch where you want something be always the case rather than happening a single time.

Understand the difference between inputs and outputs:

image5

Children need to be aware of the differences between inputs (keyboards/sensors/mouse) and outputs (sounds/movements/led/motors).  They need to understand that an algorithm turns an input into an output.  Without an input to start the algorithm, running it cannot achieve the desired output.

Use Logical arguments:

image6

Logical arguments can be thought of as maths.  Computers make excellent calculators and they understand add (+), subtract (-), multiply (x) and divide (/).  They also understand the concept of equivalence (=) and inequality (< or>).  Using these within algorithms create incredibly useful possibilities.  For example when a score is greater than 1000 you win, or if lives reach zero then trigger game over.

Use Variables:

image7

Following on from logical arguments variable allow for sections of code to be changed without the need for human interaction.  Think of this as the idea of adding one to the score each time Pacman eats a dot.  Think also as time as a variable where any form of countdown is used.  There will be a section of code that changes the variable ‘time’ to reduce by one.  Once the children start to use variables, they can create more complicated games and programs.

Use selection:

image8

Selection is a useful tool in writing algorithms where you need to create different outputs based on the input that is given.  For example, we wanted to create an algorithm that changed the name of the shape said by the character depending on the number of sides we input.  Having a list of shape names allows us to select the correct item from the list.   If the number of sides a shape has is inputted as three, we could select the third item on our list, which we had prearranged to be a triangle.

Use subroutines:

image9

Subroutines allow for programs that are more complex.  A Subroutine is a separate algorithm that can be triggered from the main algorithm.  When we talk of programs and certainly in real life examples, programs are collections of algorithms that are triggered as needed by other sections of code.  Subroutines allow us to trigger two or more algorithms at once.

Decomposition:

image10

Once children are aware of the above concepts, they can start to reverse engineer other algorithms to understand how they work.  They can remix and improve the programs.

Coding is more than clicking blocks better and hoping for the best.  It has rules that form the basis of learning as arithmetic does in maths, or grammar does in English.  With a sound knowledge of these concepts, children are free to be creative and create the next generation of apps, programs and games.

Leave A Reply