6 techniques to teach programming that you can use in your classroom

February 26, 2019

Programming is a learned skill that can be improved with practice.  Sure there are some who find it easier than others but that is the same with any subject or skill.  You only need to look at the sporting world and recognise the likes of Ronaldo or Messi to see that some people will excel in a skill that others find harder to get to grips with.  That does not mean that all the children who don’t have a natural talent should never be given a football to kick against a neighbour's wall, they just need a little help in finding their feet – excuse the pun!

 

Programming is no different, you will have pupils who are happy, and indeed relish the opportunity, to work through a page of programming problems.  You will equally find others who find programming problems daunting and need other techniques to help them gain confidence in their ability to tackle programs by building up their computational thinking skill set and learning the necessary syntax.  Here are six tried and tested techniques you can use in your classroom straight away that can help all your pupils embed their new found skills and perhaps even enjoy the problem solving side of programming.

 

 

1) Use live coding

 

Instead of only having programs already created and ready to be displayed in a PowerPoint presentation, it can help your class to see you type in your programs live, with your screen being projected onto the whiteboard.  This allows you to talk through each stage as you create it and allows pupils to ask “What if…” questions. It also gives them a sense of how you create your programs (i.e. top down etc) and learn the keyboard shortcuts you may use.  This method also has the added benefit of slowing you down which allows the pupils to process your programs and reduces the risk of somebody getting left behind when you simply talk through a slideshow.

 

2) Make predictions

 

Ask the pupils to predict the output of programs (either as you type them using the technique above or from a pre-created program that they are given time to read through and process before they are required to give an answer).  Ideally their prediction should be recorded publicly, either by voting (electronically or by simply using a show of hands) or by writing it on a whiteboard.  The pupils who get it wrong are prompted to pay more attention, but you must be careful not to punish or criticise students who predicted wrongly and instead use it as a stepping stone to further exploration of why they got it wrong or made the wrong assumption.

 

3) Paired programming

 

When using paired programming, it is important to put everyone in pairs, not just the learners who may be struggling, so that no one feels singled out.

 

Two pupils need to share a computer for this technique to work.  One is in charge of the typing whilst the other offers suggestions.  They need to swap roles regularly and it helps to announce when they need to swap to the class. 

 

Both students in the pair learn while doing it. A weaker student gets individual instruction from the other, while the stronger student embeds their knowledge by having to  explain what they are doing and by being forced to consider things that they may not have thought about.

 

4) Remember what they already know

 

Expert programmers have a wealth of skills and knowledge to draw upon whereas students who are just starting to learn programming only have a very narrow skill set.  When they are given a problem to solve it will not be second nature to know how to break it down and your pupils will need time to look back on other programs they have created, or code they are familiar with, to see which parts can be reused.  By giving them an earlier program they have created as a starting point, and asking them adapt it, your pupils can see how their new skills are scaffolded by earlier skills which helps embed the new knowledge they are gaining.  

 

5) Type what they say

 

This technique involves the pupils telling you how to solve a programming challenge.  Set the class a problem and then nominate one pupil to tell you what to enter so you can complete the program.  You may want to bounce it around the class or stick to a single instructor but the trick here is to type in EXACTLY what they say and nothing more.  As you type, your screen should be displayed through the projector for the whole class to see.  Inevitably they will make an assumption, miss out a close bracket or speech mark or forget to tell you something that they deem to be obvious.  You need to “play dumb” and use these assumptions and syntax errors to your advantage.  Don’t move onto the next line unless they tell you or use the wrong case for the initial letter of variable name etc so your code will get a few errors.  Usually the rest of the class will pick up on the “error” you made immediately and shout it out or the pupil giving the instruction will point out your syntax error. If they don’t, even if you spot the mistake, don’t correct it for them, run the program and act surprised when it fails to work.  Ask the class to explain the error message or identify the logic problem and get them to tell you how to correct it.  This is a great technique to help embed syntax and help the class think pedantically when they come to typing in their own code.  The class also likes the fact that you are the one making the mistakes in “your work” so are happy pointing it out to you and getting involved.

 

6) One language at a time

 

The last tip I will give you is perhaps the most important one: focus on one programming language at a time.  Don’t mix and match as it often leads to confusion.  Make sure pupils are fully confident with one language before introducing a second one.  Attempting to force a new language on them too early such as switching from Python to JavaScript will confuse learners and erode their confidence. If possible, leave the web-page design until next year if you are wanting to help them get to grips with the basics of Python.

 

There are many techniques that are available, and these are just a few and you may know of others which we would love to hear about in the comments.  The key is practise, practise, practise.  Don’t assume as they have solved one or two programs that is enough; pupils need to fully embed their new skills before moving on and often require recaps of learnt techniques, especially if they have not been visited for a while.   Mix and match your techniques to stop your lessons from becoming stale and keep the energy levels up to motivate your pupils and help them on their programming journey.

 

 

Share on Facebook
Share on Twitter
Please reload

Featured Posts

6 techniques to teach programming that you can use in your classroom

February 26, 2019

1/5
Please reload

Recent Posts