Programming in primary school: Making monsters!

Learning to program is more than simply learning to write code. This is why many school computing curriculums focus on computational thinking; developing skills such as logical reasoning, decomposition, algorithmic thinking, pattern recognition and abstract reasoning.

To communicate with computers instructions need to be unambiguous and in the right order. For many students this is an unfamiliar way of thinking that can take some adapting to.

This video of the famous “make a sandwich” algorithm (which makes a great unplugged activity for the classroom!) went viral recently, and demonstrates the funny consequences of kids trying to write very specific instructions for a simple task.

The new Australian Digital Technologies curriculum introduces students to computational thinking from the very first year of school. Even young students can grasp computer science fundamentals with developmentally appropriate activities and the right support.

To help students get going with the new curriculum, we’ve just released our first programming course designed especially for younger learners. Monster Maker provides a fun and friendly introduction to computational thinking, in alignment with the Australian Digital Technologies Curriculum for Years 3 and 4.

Students are introduced to the concept of sequencing, one of the building blocks of algorithms.

What is an algorithm?

The Digital Technologies curriculum requires that students in Years 3 and 4:

Define simple problems, and describe and follow a sequence of steps and decisions (algorithms) needed to solve them (ACTDIP010)

Algorithms are ‘step-by-step procedures required to solve a problem’, and consist of one or more instructions. Sequencing refers to the specific order of the instructions within an algorithm. Understanding that a computer will follow these instructions in the defined order, and that the order of instructions within an algorithm may impact the outcome of that algorithm, is a fundamental skill in programming.

So in simple terms, sequencing is just “doing things in the right order”. One of the most effective ways of teaching this concept is showing students what happens when things are in the wrong order!

Let’s consider a simple example similar to the “sandwich algorithm” in the video above.

An algorithm for pouring milk on your cereal might look like this:

  1. Remove lid from milk bottle;
  2. Hold bottle over cereal bowl;
  3. Tip bottle towards bowl until milk starts pouring.

We could reorder the sequence of instructions like so:

  1. Hold bottle over cereal bowl;
  2. Tip bottle towards bowl until milk starts pouring;
  3. Remove lid from milk bottle.

Now our algorithm is not in the correct sequence and, consequently, it doesn’t work to solve the problem it was designed for.

Monster Maker gets students thinking about how solving a problem may require a specific sequence of instructions, and reflecting on the ways in which changing the order of an algorithm may impact the outcome.

Visual programming

The Digital Technologies curriculum also requires students in Years 3 and 4 to:

Implement simple digital solutions as visual programs with algorithms involving branching (decisions) and user input (ACTDIP011)

This means that students need to write their own programs using a visual programming language. That is, a programming language that represents programming graphically, rather than as text.

Visual programming languages allow beginner programmers to focus on the logic of their programs, without worrying about the syntax (the set of rules determining exactly how to write and combine instructions in the precise way that the computer can understand).

In Monster Maker, students write programs using Grok’s custom version of Blockly, a visual programming language which makes real code accessible to children via a simple drag-and-drop interface.

Creating a monster!

Now let’s implement an algorithm with code. In the spirit of the cereal example, we could have an algorithm to create a monster that works like this:

  1. Draw a body;
  2. Paint the body blue;
  3. Draw eyes;
  4. Draw a nose;
  5. Draw a mouth.

In Monster Maker this looks like:

The blocks on the right-hand side make up our program, and the animation on the left shows us what the program does at each step.

So what happens when a student gets the order wrong? Let’s try reordering our program so that the paint block comes last in the sequence.

The paint block should be placed before the eyes, nose, and mouth blocks.

Whoops! Now our program is in the wrong order, and we’ve painted over our monster’s eyes, nose, and mouth.

Monster Maker provides loads of opportunities for students to experiment and create with code but avoids the hurdle of incorrect syntax that are off-putting for younger students.

Grok 💙s teachers!

If you’re a teacher, you can access the Monster Maker activities, as well as all other resources on our website, with a free all-access subscription.

Happy Grokking!