Year 7: Data Representation & Algorithms

 Bunny, nay! ART!
Bunny, nay! ART!

A couple of weeks back I saw a link on Twitter to a post on Laura Bain's blog about data transmission with year 4 and 5s. Go read the post, since it's nice and short, but it's basically kids sending binary data representing black or white pixels to each other using a OneNote Class Notebook. I was starting some of my students off on an activity that used a similar idea to (try to :) teach my kids about image data, and look at why algorithms are important while I was at it.

Late last year I was at a PD with other CEWA teachers to collectively produce resources for different areas of the new Digital Technologies curriculum that will come in in 2018. One of the lesson sequences I worked on was understanding the digital representation of image data with a side helping of algorithms.

The Setup

Since I don't like being too easy on my kids (these are 12 year olds after all!), they've got to figure some stuff out for themselves. I started out with getting them to describe the bunny picture to me. We'd discussed binary, pixels and colours the previous period, so some had an inkling of what was going on with the blocky bunny.

What do you see? How would you describe it?

How would you describe it if I was on the phone or in another room?

How would you describe it if you could only write things down?

How would you describe it if I needed to draw the exact same picture?

A couple of students suggested using coordinate systems, with lots of them sticking with answers like "it's a bunny", with not many even mentioning details like the colours of the eyes and nose.

The Task

 Since we were not going to get anywhere just talking about it, it was time to put students' belief in their own eloquence to the test:

  1. Partner up with someone
  2. Without letting their partner see it, use the rather nice Piskel website to draw a simple (no more than 10x10, black and white only) pixel drawing
  3. Save a copy or screengrab of the drawing for later reference
  4. Write up a set of step-by-step instructions for their partner to recreate the drawing
  5. Give the instructions to their partner, who, without seeing the picture, has to draw it
  6. Compare the results with the original

Because this is an activity where things are not meant to go according to plan, evaluation afterwards is really important. While they are writing their instructions, students were primed to think about what they found difficult to describe, and when following instructions, to think about what they found difficult to follow. When comparing source and copy images, they needed to look at what types of things went horribly, deliciously wrong.


There was quite a variety in the accuracy and clarity of the instructions, even with some setup and some students explicitly talking about coordinates. I've included a small cross section below (spelling errors have for the most part been left in unless they made the instructions difficult to follow).

“Step 1 get white and draw a circle
Step 2 fill in the circle
Step 3 put a big black square mid left
Step 4 put a big square top left
Step 5 put a big square in the middle and bottom left
Step 6 put a big square bottom right mid right and top right
Step 7 show me”

“Firstly look at the bottom right hand corner.
Then put it the [coordinates] in
15, 12
16, 17
To add colour. type in the colour #ff0000 at 15, 18
Then the full colour ... put in #a2a1a1 then click bucket to colour.”

“Your goal is to follow the instructions as well as you can so you get the perfect image
Step 1: Go on the biggest drawing tool you can.
Step 2: Start on the top left, draw 5 perfect blocks going down.
Step 3: Go back on the third block you drew and draw three perfect blocks going to the right.
Step 4: On the last block you drew draw 2 blocks going up and two blocks going down.
Step 5: Put your mouse on the top block of the second line you drew, go 2 right then start drawing 5 blocks going down.
And you just drew HI your welcome.”

“Step 1. Start with a line starting a (8,7) to (8,11)
Step 2. Start at (11,7) to (11,11)
Step 3. Then go to (6,14) to (13,14)”

“follow these instructions.
I will wright the direction to move your mouse and then I will say a colour to place in.
Start with a black pixel
right nothing, right black, right nothing, right white, right white, right white, down nothing, left white, left nothing, left nothing, left black, left black, left black, down black, right nothing, right black, right nothing, right white, right white, right white. Your pixel drawing should be complete.”

There were quite a few sets of instructions that were completely subjective, but a good number of them were pretty accurate and had chosen strategies that, even if they didn't specifically mention pixels did a good job at representing colour, position, and scale. Notice that a couple of students included colour into their instructions, although only one of them made sure that the colour they drew was going to be the same one as the source image by including RGB codes.

My next lesson with these two classes will be students trying to recreate images, establish what algorithms are important, and then work on an algorithm with the class to follow when writing and reading image data for simple images. Depending on time/progress we'll look at colour, particularly since Piskel maintains a numbered swatch panel, which might initially look like an attractive way of recording colours (à la indexed colours).


My two classes of year 7s really got into this, and handled the discussion part of the task quite well. It was a more difficult task making sure that the pictures they drew in Piskel weren't too complicated (I had houses, cats, a Nintendo DS, all multicoloured, before I reminded them they had to write instructions on how to draw them!). The adversarial side of the task was also a big incentive and the kids responded well to that part.

The difficulties mostly lay in the technical details:

  • Students had only just received their laptops for the first time, and there was a bit of New and Shiny Syndrome going on
  • I didn't think through the swapping of instructions that well to begin with, and so there was some physical swapping of devices with new tabs open going on for those who finished instructions early, which wasn't ideal

Since OneNote Class Notebooks have been made a bit easier to use with (some) SEQTA integration, with my next batch of students next term I will have a go at using the collaborative space to share instructions and the resulting images, although OneNote has been quite flaky when dealing with a number of students and images at once.

As far as the core ideas I wanted to get to went, I think the activity was pretty successful, particularly when we got past the talking stage and into individual problem solving. Next year when I have more time with my year 7s (this year I only see them once a week for a term), I'll work it into a more fully featured task.