SNAKE GAME CHALLENGE for young programmers!

By George Deeks

Here at Neontribe, we always want to help young people enter the world of web development. Amongst other things, we have been running a Computer club at Bacton Primary school (see our blog on this). And from this, we have created a series of programming tasks that will result in a complete version of the popular game, 'Snake'.

We are now offering up the chance for anyone to use our 'Snake Game Challenge' resources to help an aspiring developer get to grips with some basic coding practices - using just a terminal, an internet browser and the Python language! (Skip to the bottom of this page to see where they are.)

Firstly however, a little introduction to our approach:

Many primary school computer clubs use Scratch, to help kids learn more about programming. Our approach at Bacton primary school was different however, for many reasons. Although Scratch has many distinct advantages - it is fun and viscerally engaging, and takes away a lot of the setup overhead to allow users to focus on the joy of making things happen with code, it also misses out some of the fundamental steps of coding. One of the fundamental skills for any programmer is the ability to type out lines of code precisely - a single character out of place and the whole program may fail. At Bacton, our focus was on a step-by-step journey through typing out all of the required lines of code, explaining and reminding the children of key concepts along the way.

This combination of covering concepts generally whilst being precise in each step is more reflective of programming generally, and makes the task of exposing young children to actual code less frightening, if they are actually writing it out themselves. This is in contrast to the 'drag and drop' visual approach taken by Scratch, which has more of a 'designing code' focus.

So, our aim is for the kids to type out full working programs. We always write in Python, an easy to learn and use language. Also, we always take advantage of a free-to-use online project management tool called Trello. Trello is frequently used by us here at Neontribe, and with its checklist feature, we can 'tick' each coding task as completed as it is written out.

This made lesson planning and overall progress assessment easier, as well as breaking up the way we approached teaching the material. At Bacton, we had one kid read out the instruction, one type it, and another click on the Trello board to say the task had completed! This is a great strategy if you have limited PCs and lots of students simultaneously involved.

Furthermore, by giving clear instructions as to what to type, we have the further advantage of appealing to a range of children, in terms of abilities and age - some of our students were KS2 and hardly had much exposure to typing on a keyboard. Other, older students had a basic understanding of programming concepts such as: variables, if/else statements, and debugging, to name a few.

Recently, I was tasked with finding another challenge for the kids. Looking for a simplistic yet addictive game, I remember (from a long time ago!) 'Snake' on the Nokia 3310 (pictured, above). Furthermore, I saw an example of Snake written in a single Python file . Drawing heavily upon this, I produced a simpler version, and broke up the coding of it into 8 distinct chunks or features of the game. All you need is a terminal or application that can run Python files!

The code here is by no means perfect, but should appeal to junior developers with different levels of experience - especially if guided by a more experienced programmer. And there are lots of possibilities to extend the game further than its current state!

Where is it?

To find the resources, click here. There, you will find further instructions as well.

Let us know how you get on with it! All thoughts and feedback are appreciated, either tweet us or email me: