Coding is just instructions

After volunteering at a local Code Club, run at a primary school for the past couple of years I have tried to describe what code is and how to solve problems, create games and animation with it in the most relevant way possible to the kids.

One of the ways they seem to understand it is that code is just instructions or orders you are giving the computer. For example:

  • If this is an Apple, do this.
  • Else if it is a banana, do this.
  • If it isn’t either then, do this
  • Put this in a bucket till i need it
  • Let’s look at these things one at a time
  • Keep doing this till i say stop
  • When this equal this, stop
  • You know that bucket, find me all the apples in it

Sometimes the best way is to keep it simple and relate able.

A step into a larger world

As Obi-Wan Kenobi once told Luke. (Clip)

That’s good, you have just taken your first step into a larger world

Recently at the Code Club i help out at, someone was struggling to work out why their python code didn’t run. He called me over, we looked at the code the project was asking him to write and what he had written. It looked right, no typos, no missing declarations or wrong variable names. We tried saving it and re-opening in case Trinket (online editor for python) had failed parsing it correctly, same result. So i called over another volunteer, they checked it…nope it looks right. A 3rd volunteer is free (we are lucky we have at least 4 of us every week), they checked it too. It looks right, so we decided to disregard the sample code and work out what we thought it should do. 2 changes later and after a corrected import statement and while loop parameter and it is fixed. SUCCESS!!! 10 lines of code, 2 bugs.

The student thanked us for our help and then proceeded to say

Those 2 bugs wasted 10 minutes of my life

I said “I know, welcome to coding in real life, you are lucky if it only takes 10 mins and never believe any sample code on the internet”.

“…you have just taken your first step into a larger world” 🙂

1st day at school

Yesterday I helped out at my first Code Club, so it was like my first day at school. I had prepared (a bit) by going through some of the first few Scratch and Python projects on the Code Club site and doing them myself. Having not really done loads with either language I think it helped as I fell into some of the same pitfalls that the kids did (and some they didn’t!). It helped when they had questions or call me over to help as their code didn’t run and they couldn’t work out why. I was definitely more comfortable helping with the Python than Scratch, probably due to it being closer to what I do every day.

I am amazed by how quickly they picked things up and got through the projects, even adding their own touches to the designs as they went, with no fear or apprehension. It is great to see how enthusiastic they are to dive in and get things working. They even pick up the developer trait and not saving often enough when they are in full flow. 🙂

A big thanks to all the other volunteers for spreading a calm demeanour that helped the club run smoothly. Can’t wait for next week.