Skip to main content

20 October 2022

Code:{ish} Ping Pong Pair programming to engage pupils into coding

Javier De Las Heras profile image
Written by

Javier De Las Heras

As you may know already ‘Pair programming’ is an agile software development technique in which two students work together on one computer. One is the driver and one is the navigator; The driver types code on the computer and the navigator checks each line of code as it is entered. It is important to notice that there are continuous role switching every 5-10 minutes, or as needed. The rationale is that the navigator, while checking the code, comes up with further ideas to improve the programme; This frees the driver to focus on solving the problem. 

The main three advantages of this approach for pupils are: 

  • It is an excellent opportunity for students to learn from one another 
  • It is a great environment to practice team skills, key to effective software development 
  • It has even greater benefits for learners new to coding (Novices) 

 

Ping Pong Pair Programming is a mixture of Test-Driven Development (TDD) and Pair Programming. It is a very simple way to get two pupils developing code and debugging it in tandem.  

The variation I use in lessons works as follows: 

  1. Teacher gives pupils a short programme with 1-2 errors and model with some pupils how to debug it and how to use the "Error record" sheet that you will provide. This is important as this way everyone knows how it works 
  2. Teacher set pupils in pairs in 2 computers. The pairing must be strategic, that is pairs with similar coding skills as otherwise one learner will dominate the game 
  3. Pupil 1 and Pupil 2 write 3 short programmes with 1-2 errors each (Teacher can provide sample programs to support weaker coders) 
  4. Pupil 1 tries to debug pupil 2’s programme until they agree it is fixed; The dialogue here is very important as it helps with pupils’ understanding and command of the technical language. They use the "Error record" sheet provided
  5. Then pupils swap to debug each other’s code for the 3 short programmes they typed. They act alternatively as driver and navigator. 

 

OPTIONAL: You may have 2-3 programming experts circulating with you as “fellow” teachers; These will be prompting novices while typing the 3 short programmes and also supporting when pairs are debugging one another’s code. These “fellow” teachers will provide feedback on the main errors that others had difficulty in debugging at the end of the lesson. 

The main advantage of Ping Pong Pair Programming is how quickly the pair achieves skills to write and debug code in a dynamic environment similar to that of software development companies using Agile Development. 

Why not trying it or any variations of this activity? 

Discussion

Please login to post a comment