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.
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.
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.
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
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? …
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.
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.
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.
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
Programming 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 structure. This 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.
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).
TIP 10 : Learn to debug…debug by explaining your code
All programs have mistakes at first (unless you are a very good logical thinker or the program is large). Finding them involves testing and debugging. You find you have a bug by testing, but you work out what is wrong by debugging. Christopher Strachey, one of the original computer science pioneers, was known as a wizard programmer but especially a wizard debugger. He could also quickly help others work out their mistakes. How? He just asked them to explain their code to him, and often they then suddenly saw the mistake in the process.
Find out more about Strachey and his approach to debugging
If you are a:
- student
- Practice reading and explaining your code to others – focussing on why it is right.
- Aim to program by logical thinking – you know why it is supposed to work – not tinkering, then check your reasoning when debugging.
- Practice by doing debugging exercises not just programming exercises
- teacher:
- Do not debug code for your students, teach them to do it themselves
- Ask them to explain to you the parts of the program that do not work
- Make sure they use procedure/methods/functions so decompose their code into small units so it is easy to work out which unit is not doing the right thing and then that is the part you have to explain.
- Encourage your students to code (and debug) by logical thinking not tinkering.
- Set simple debugging exercises (following deliberate practice approaches so gradually getting harder) not just programming exercises.