Learning to Learn (to program)

Paul Curzon, Queen Mary University of London

We all learn naturally but some ways of learning are more effective than others. Whether it is a skill or knowledge you want to learn there are good ways and bad ways. These pages are about how to learn quickly and effectively.

Sign up to our blog to read new posts as added.

Programming is a skill based on knowledge. Everyone in the digital age needs to learn at least a little of how to program. (If you want to you can learn a lot.) We will therefore use it as a source of examples, but the tips here are about learning in general.

Learn to learn and you can be more effective at anything you put your mind to.

If you are a:

  • student: learn more effectively
  • teacher: help ensure you get the best of your students

TIP 1: It is about effort not talent – Anyone can learn (to program)

The first and most important thing to realise is that with enough of the right kind of practice anyone can improve (and keep improving) at any skill, including programming. Our brains are amazing, they can just keep getting better if we do the right things.

Learning to program is not about talent. It is about effort and practicing enough in the right way.

Find out more…

If you are a:

  • student
    • Get in to the habit of whenever you find yourself saying “I cant …” or “I don’t understand…”, add on the end “…yet”. Practice doing it…
    • Constantly remind yourself that with practice you can get better, however hard it is now.
  • teacher:
    • Every time a student says “I cant …” or “I don’t understand…”, add on the end “…yet”.
    • Constantly remind your students: “It is not about talent. Anyone can learn to program. You can get better with practice.”

TIP 2: The right kind of practice is “deliberate” practice

10,000 hours of practice is often given as a rule of thumb to become an expert. However, if it is the wrong kind of practice then all those hours may not help. An effective kind of practice is “deliberate practice”. This is one of the top 10 or so educational approaches known to be effective as a way to improve learning, and is based on research in a lot of areas from elite sportspeople, virtuoso violinists, top medics and more. It is what elite people do to become one of the elite.

Find out more

If you are a:

  • student
    • Learn about deliberate practice and put it into practice when you learn.
  • teacher:
    • Set up learning resources and situations to support deliberate practice.

TIP 3: Master skills a small step at a time.

Working hard, putting in the time and effort is important … but it is NOT enough. You could jog every day for years and NOT get any faster or be able to run ever further. Similarly, you could spend hours trying to write programs but not get any better.  It isn’t just putting in the hours. You have to put in the right kind of hours.

You need to do the right kind of practice. The ideas behind deliberate practice suggest you should aim to master skills a small step at a time – but make sure you do master them before moving on.

Find out more

If you are a:

  • student
    • Practice lots, but master simple things before you move on to harder ones.
    • Do push just out of your comfort zone in your practice once you have mastered something.
    • Identify something just beyond what you can currently do and practice that until you can do it easily. Only then move on to the next thing. 
    • Don’t think that doing it once means you have mastered it!
  • teacher:
    • Set activities that gradually increase in difficulty with lots of exercises to practice at each stage.
    • Identify a progression in concepts to introduce.
    • Don’t let students rush on to writing ever more difficult programs to write before they have fully mastered the concepts in the previous ones.

TIP 4 :  Know the sub-skills and practice them.

To learn a complex skill you need to practice, and so master, the right things a little at a time. That means you need to break it into sub-skills that you can work on separately. This is the idea behind deliberate practice too. What sub-skills have experts mastered? Practice those. As a novice there are a specific series of things you need to master for each programming construct, including reading code

Find out more

If you are a:

  • student
    • As a novice, practice all the novice skills separately, focussing on one construct at a time.
    • Exercises to trace programs are especially important to practice.
  • teacher:
    • Set exercises that practice each of the skills separately, for each programming construct.

TIP 5 :  Focus on mental models.

To get the best out of practice, when learning a skill, you need to have the right mental models. That is where knowledge and skill work together in tandem. The right sort of knowledge can be used both to base skills on, and to hone them. Practicing the right skills can develop the right kind of knowledge. You need good mental models, good understanding, of what you are trying to do.

As a novice programmer, the first and most important mental models are those of the different programming constructs. What do they do? How does a variable work? What does a while loop do? …

Find out more

If you are a:

  • student
    • Focus on making sure you understand what each new construct does, then do lots of practice of all the sub-skills around it until you have mastered it.
  • teacher:
    • Make sure you make it clear to your students that understanding meaning matters, not memorising syntax.

TIP 6 :  Build mental models by experimenting

There is a much better way to build mental models than just reading explanations: work it out for yourself! Learn by experimenting! For programming, this is a really powerful way to learn. Instead of building a mental model of constructs from explanations, first try and build your own mental models by reading programs others have written (simple ones to start with), and trying to work out how they work. Learn by making changes based on that and predicting what will happen, then checking if you are right by running the new program.

Find out more

If you are a:

  • student
    • Don’t just rely on explanations, experiment with existing programs.
    • Don’t spend your time copying programs, spend it making small changes to existing programs and predicting what will happen.
  • teacher:
    • Encourage students to experiment and give them time to do so.
    • Provide a series of starting programs for them to experiment with.
    • Give them that code – don’t waste their time making them type it in.

TIP 7 : Reinforce understanding with concept maps

Once you have worked out the basics of a mental model (such as what a programming construct does), you need to reinforce and refine that understanding. You need to do that actively. Weak learners often try and memorise explanations by repetition but that doesn’t help understanding. Reading an explanation and then drawing a concept map, by contrast, is a powerful way to reinforce your understanding.

Find out more

If you are a:

  • student
    • Draw a concept map for each new concept you learn
    • Keep redrawing it again later as you understand more: you will probably be able to draw a more complex concept map.
    • Write explanations based on your concept map
  • teacher:
    • Show students how to draw concept maps
    • Provide some simple examples to show the idea, but remember the biggest benefits come when students create their own concept maps.
    • Set exercises to create concept maps for each new concept, once students have done some experimentation.
    • Set exercises to write prose explanations from concept maps

TIP 8 : Immediate, Frequent Feedback Matters

The real key to deliberate practice, to putting in hours of practice that is as effective as possible, is to have immediate and frequent feedback. You need to find ways to be sure what you are doing is right (or wrong). You need to practice the right things and fix the causes when you get things wrong. Otherwise, with all that practice you could just  be getting better and better at doing it badly. Programming provides natural ways to get immediate, frequent feedback as long as you take small steps at a time.

Find out more

If you are a:

  • student
    • Practice writing small programs that introduce single new things at a time.
    • Write programs a little at a time, recompiling, running and testing frequently.
    • Don’t be frustrated by compiler messages, see them as feedback to help you improve.
    • Test programs thoroughly, not just once and then assume it works
  • teacher:
    • Set programming exercises that are small
    • For large programs encourage iterative development.
    • Provide exercises with test plans, teaching debugging skills.
    • Provide other mechanisms for immediate feedback if you can, eg marking programs on the spot as a student completes them, not having them handed in with feedback days or weeks later.

TIP 9 : Follow semantic waves

SemanticWave.jpgProgramming is a very technical subject with lots of jargon to learn with precise technical meaning. To master the subject you have to both master the terminology and gain a deep and precise understanding of the concepts. If explanations and activities just  use more jargon to explain, building complex concepts on top of complex concepts then it is very hard to learn. The secret to providing good learning experiences is to make your explanations and learning activities follow Karl Maton’s (2013)  semantic wave structureThis involves introducing terminology or concepts but then using everyday language to explain their meaning (not just more jargon) and also using everyday contexts that students have already mastered and are familiar with. This is why metaphors, analogies and unplugged computing are powerful ways to teach (if used well). You must also however then actively help students link those everyday meanings introduced directly back to the technical concepts and language if students are going to really understand the technical meanings.

Find out more

If you are a:

  • student
    • Practice writing your own explanations following a semantic wave structure. It will help you understand.
    • Make sure you think about how everyday explanations you are given relink back to the technical terms and concepts.
    • Similarly, work on lots of examples (whether set them or not) and actively think about how they illustrate how
  • teacher:
    • Make sure your explanations follow a semantic wave in structure
    • Plan learning activities to also follow this structure
    • Make sure you do not flatline – working completely in technical language or completely with everyday versions, never linking to the abstract concepts and terminology
    • Make sure you do not leave students in the trough – leaving them with the examples without making them repack the ideas to see exactly how they relate to the technical words and concepts.

K. Maton. 2013. Making semantic waves: a key to cumulative knowledge-building.  Linguistics and Education 24, 8-22 (2013).


Lots more on learning to learn (to program) to come


Institute of Coding logo