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.

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.  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 until 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 trying by running the 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.

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


Institute of Coding logo