Teaching computing for the first time: learning to code and getting started

Keen to challenge students, Stephen O’Callaghan started teaching computing last year. He reveals how he learned Python online and what he’s doing differently in year two. This is an extract from the Guardian…

…The first thing thing I did was sign up to Codeacademy – a site where users can learn and teach code for free – and began working through the Python exercises. I chose Python as my coding language of choice because it is quite close to written English and there were plenty of support materials online.

After a few weeks of spending 30 to 45 minutes a day working through the Python tutorials (little and often), I decided to attempt one of the GCSE programming projects and immediately became stuck. Online tutorial sites are great for learning the syntax of a programming language but don’t necessarily teach you to solve problems. This is where computational thinking comes in.

After a call for help on Twitter, I quickly found myself being tutored through the problem solving side of things via Skype and email by two amazing computer scientists @codeboom and @colinthemathmo. Problem solving is the essence of computer science; using a computer as a tool to solve real world problems. The only way to get good at problem solving is practice.

Although when I returned to school in September I still had the annual fear after six weeks off, I was actually quite excited to get started. Teaching the problem solving and programming aspects of computing provided a really interesting contrast to the ICT I had taught previously.

My lower-ability students felt success quicker and gained in confidence by solving relatively simple problems, whereas the higher-ability students came across something that they didn’t always get right first time. The problem-solving lessons provided a great platform for differentiation by task and it was amazing to see the students take a step back and really think about the problem and plan out a solution.

One of the tasks I set students was to create a program, using Python, that takes two numbers, multiplies them together and then prints the answer. At the higher end, students had to create a calculator that gave users options and did different things depending on what options the user chose. These problems were tailored to what we had covered in class; topics such as variables, data types, selection and so on. Students had to design a solution on paper, code it and then evaluate their solution.

There were plenty of times when students got stuck (usually logic errors) but sometimes I didn’t know the answer. So I advised them to do what I did when I didn’t know how to do something – use the internet. Students started becoming quite proficient at searching blogs and forums to seek out the bit of code that would help them.

In hindsight, I focused a little too much on students learning the syntax of a particular coding language rather than embedding wider programming concepts, such as selection and iteration, something I’m going to change in my approach for the upcoming school year. Also, I found that students responded well to the challenge of solving problems rather than just following step-by-step guides.

Obviously they need a starting point, and tutorial sites or syntax guides will give students that. But I’m going to start getting students thinking about problem solving sooner so they can see programming as a tool for solving problems rather than an exercise that they must get right at all costs…

Stephen O’Callaghan is head of key stage 3 computing at Bristol Brunel Academy. He tweets as @MOCallaghanEdu and blogs at his wordpress site: @mrocallaghan_edu.

More at:  Teaching computing for the first time: learning to code and getting started

Your thoughts and advice on teaching children to code? Please share in the comments or on twitter…

Why being a maths teacher is not adding up for new recruits
Schoolboy, 14, 'barricaded woman teacher inside a classroom and laughed as he sexually assaulted her'
Categories: Teaching and Technology.


  1. CSc_teacher

    SchoolsImprove It helps to have an aptitude in programming. Have problems to solve and use coding to do the solving. I like #scratch

  2. gingerdisco99

    SchoolsImprove Scratch looks so awful – Codeacademy has much more ‘now’ feel to it. #interestedparent

  3. CarbisRichard

    SchoolsImprove Many moons ago when computer clubs were 1st invented I remember having to write progs for the ZX Spectrum and Commodore 64.

Let us know what you think...