Learning to code – a student’s perspective

By | December 23, 2013

From September 2014 the UK’s schools will all be teaching the nation’s children how to write computer code. If the rhetoric is to be believed, within a few years this wave of computer-literate re-enforcements  will be rushed into the front line of the global technology race, shoring up the country’s position as a leading innovator.

You can’t argue with the sentiment – we have a great heritage in technology but the current opportunities for children to actually understand computers (rather than just use them) are hard to spot in the ICT curriculum.

So, soon hundreds of thousands of children will be learning about computational thinking, using graphical programming sequences, and writing lines of code… and this will not be without its challenges and considerations.

With this in mind, I’ve been learning to code using Python to understand better the nature and scale of the challenge. I took part in a MOOC run by a Texan university and have learned quite a bit about what every student will have to cope with in their Computing lessons:


My implementation of ‘Asteroids!’, written in Python. You can play it here, if you’re interested. Use the run icon to start the GUI, cursor keys to move, space bar to fire!


1. Computational thinking isn’t easy

It certainly wasn’t for me. I found, throughout the length of the course, that I really struggled with the very disciplined, logical and sequential thinking that precedes working code. This improves with experience, but will need to be actively taught as a process which students need to understand and rely on. It’s also quite a solitary and deep level of thinking – you need to get into ‘the zone’ and really concentrate on the problem in hand.


2. Maths is a really, really important determinant of success

And not the simple stuff either. Concepts such as Modulo, Sin/Cos and Pi all need not only to be used (the easy bit) but the reason for their use and what they do understood. Now I’m a relatively traditionally academic type (indeed, I got the English Baccalaureate before it was even invented, how’s that for prescience?) but I found that my mathematical grounding was too weak to make the leaps which others were capable of. It was the repeated hurdle against which my thinking and then my code stumbled. This is one of the major reasons I worry about mainstreaming coding in the curriculum; success is defined much more by one’s mathematical ability and knowledge than any ‘technological’ aptitude or interest in the outcome of the exercise.


3. Coding as a beginner is really, really frustrating

People feel positive and engaged when effort is rewarded with visible success. Don’t expect to feel this way too often when learning to code; these moments of blinding illumination occasionally light up the experience (I can remember two) but the over-riding tone is one of “Oh why the hell isn’t this working now?”.

Whilst any programming language has a defined and logical syntax in theory, the reality is that there are so many, many inter-related and miniscule ways in which the code you write can fail to function that hours and hours can be spent trying to make it work, often with nothing to show at the end of it. It’s a recipe for high drop-out rates and switched-off learners if I ever saw one. I think some school-age students will find the experience similarly frustrating.

Why did I keep going? Mostly because I’d opted in, rather than have the course pushed on me.


4. Any coding activity needs to be heavily scaffolded

The Professors at Rice University who ran the course I took were great at this. Each week I had to code a mini-project (e.g. the card game ‘Blackjack’) and this was supported by a taught element (60-80 minutes total of short videos), practice exercises, quizzes to check understanding and a template to structure my code around. The crucial element, however, was a discussion forum to seek peer assistance; they were full of advice, diagnosis and encouragement, all of which pushed me forward without just giving me the answer. Classrooms are probably even better suited than the internet for this form of support.

The coding template, however, was the real safety net without which I would have been faced with the tyranny of the blank page and blinking cursor. It helped break complex, lengthy tasks (sometimes up to 300+ lines of code) into discrete, logical chunks and made progress possible. You don’t need to have taught English to nine years olds to appreciate why this is an absolute necessity if children are to learn to code.


So, in summary:

Not every student is going to find learning to code easy, interesting or rewarding, and many will doubtless struggle with its seemingly impenetrable mysteries. It has the potential, if badly taught or forced on everyone, to be damagingly disengaging and difficult.

Just like the bad old ICT curriculum, one size is not going to suit all. No-one really believes in the ‘digital natives/ digital immigrants’ shtick anymore – it seemed a cogent metaphor at the time, but like any group of people, a class of children invariably contains children who are very comfortable and adroit using technology but also those who struggle and prefer other tools.

Teaching coding well requires a lot of preparation and support materials, and teachers will do well to make use of peer support in their classrooms wherever possible. Many schools will not benefit from teachers with Computer Science background and Teacher Development is therefore vital, but it will take years rather than months to turn a good ICT teacher into someone who can properly support students learning to code.

I would urge any school introducing coding to their Computing curriculum to make it an optional pathway, led by an enthusiastic expert.


That may read like a long list of negatives as to why schools can’t possibly teach kids to code. This is demonstrably not the case – it’s the perfect time and place to learn this skill. It’s just not easy to get right and could bring as many problems as opportunities if implemented en masse. Going back to the reasons the country is making this change, it is because coding is such a valuable C21st skill which most schools have been doing nothing to support . So let’s get it done right, not just get it done.

One thought on “Learning to code – a student’s perspective

  1. Carl

    2. Maths is a really, really important determinant of success

    Funny thing about this is, coding courses tend to include lots of maths because maths is needed to develop interesting and engaging things like games. However I would speculate that the majority of coding jobs are developing enterprise applications, which involve very little maths.

    In 20 years of of professional software development, I’ve very rarely done any maths more complicated than modulo (and even modulo doesn’t come up that often). The challenges in coding courses (such as maths and complex algorithms) are quite different to the challenges of enterprise programming (such as the sheer scale of the code bases and the number of technologies that need to be learned).

    We may be putting off many excellent potential programers if we give them exercises with too difficult maths. On the other hand, if you give children a series of programming excercises that consist of entering text into form fields the response will probably be to load up Minecraft instead…


Leave a Reply

Your email address will not be published. Required fields are marked *