7 Tips for Pair Programming in the Classroom
Updated: Apr 5, 2019
Software engineering is more than just having savvy technical skills. To be a really successful computer scientist, it's essential that you're also able to work and communicate effectively with others. Pair programming is a great way to teach kids teamwork, communication, and collaboration skills - skills that computer scientists use every day!
What is pair programming?
Pair programming is a problem solving strategy used by computer scientists around the world to work on the same problem or block of code together simultaneously, typically using one computer. Pair programming can be helpful for debugging code as programmers can share information and knowledge with each other.
Fun fact - when interviewing for development jobs today, some tech companies require pair programming as part of their interview process to learn about a candidate's collaboration and communication skills.
How does pair programming work?
To pair program effectively, one computer scientist becomes "the driver" and the other is "the navigator". The driver's responsibility is to type and write out the code, while the navigator actively watches, reviews, and suggests different strategies to try as a team. Both the driver and the navigator are mutually active and communicative participants throughout the process. You can pair program with a block or text based programming language.
How to Get Started with Pair Programming
Check out a few tips below to help you implement pair programming effectively in your class.
1. Who's doing what?
It's important to clearly define the roles of the driver and the navigator for students. You can create a chart or resource to refer back to and remind students of these roles should they go astray. When walking around, it should be easy to differentiate the driver from the navigator. If the navigator has an idea they want to try, however, it is totally okay for them to ask to type and test a quick strategy. Both the driver and navigator are always responsible for communicating frequently and engaging in the problem together.
2. Swap roles.
Provide equal time and opportunities for all students to practice driving and navigating. It's important for students to have practice with both roles to gain confidence with typing out code, actively reviewing code, and observing a problem from their partner's perspective.
3. Three's a crowd.
Pair programming works best with two people. I've seen classrooms try to implement group programming, however, this is not the most effective way to problem solve and write code. While computer scientists might have a team meeting to discuss software design or share roadblocks, it's not very common to work in groups around one computer for extended periods of time. It can be quite awkward and hard to see, which usually leads to less engagement from students who are farther away from the computer.
4. Pair students appropriately.
When pairing up your students, consider their communication and programming abilities. You can also match students by what they're interested in working on. Pair programming can work well with students at similar and varying levels if they have strong communication skills. Give time for students to choose their own partners, too. It's best to create pairs that will push each other to share ideas, ask questions, and try different strategies together.
5. Share the screen.
Take time to review body langauge best practices for pair programming with students. To pair program, students should be seated next to each other, facing the screen together. Although one person is typing at a time, the computer should be located in between the students to optimize social interaction and screen sharing.
6. Avoid going overboard.
While some students will thrive and excel at pair programming, of course there will be kids who prefer to work alone. Even in the real world, not all computer scientists love pair programming so be sure to take breaks and give students time to work alone, too. Students need opportunities to explore and work through problems independently and have a chance to think for themselves. Finally, not all projects appropriate for pair programming so consider what students are working on before jumping into it.
7. Model, model, model.
You will need to model everything! Show your students:
Appropriate body language for pair programming
Ways to communicate and explain your coding strategies
How to ask questions when you don't understand your partner's ideas or code
Strategies for encouraging, being patient with, and complimenting your partner
You may have to review these best practices multiple times. Remember, in addition to gaining technical skills, students need to learn good communication and programming habits, too.
When done well, pair programming allows students to view challenging problems and ideas from new perspectives. Students learn to become better problem solvers and communicators. You can use these pair programming strategies with students of all ages to help them think and collaborate like real computer scientists. Why not try it out?