Pair programming allows students to work together on coding projects, side-by-side, on the same computer or tablet. The idea is that two heads are better than one, and by pairing up and collaborating, students build a deeper conceptual understanding of Computer Science concepts, have increased enjoyment of coding, and have more positive views of their individual performance.1 Pair programming can be used with coding activities in all VEX platforms.
This article will cover the following topics:
- What Is Pair Programming?
- Strategies for Implementing Pair Programming
What is Pair Programming?
Pair programming is a collaborative learning method in which students code in pairs instead of individually. In pair programming, students work together on the same computer or tablet to complete coding tasks. A pair of students will build coding projects together and collaborate to improve their project and solve problems.
Pairs of students should alternate between two roles: a ‘driver’ and a ‘navigator’2 and switch roles frequently. The ‘driver’ uses the keyboard, mouse, or touchscreen and controls the main actions of the computer. The ‘navigator’ helps the driver by answering questions, pointing out potential problems with the code, and identifying opportunities for improvement.
- The ‘driver’ concentrates on immediate details such as what’s next in the project, the language syntax, and control structures.
- The ‘navigator’ thinks about the big picture such as checking the code as it is written and thinking about how the project connects to the goal of the activity.
These roles are switched at regular intervals so that students gain the benefit of each role, and both coders share responsibility for all aspects of the project.
Strategies for Implementing Pair Programming
Pair programming can look different depending on your learning environment and the ages of your students, and the VEX platform that you are using. However, strategically assigning pairs and having clear goals and expectations will prepare all students for success, allowing them to focus on coding tasks and projects across any VEX platform. The following suggestions are designed to help you get up and running with pair programming:
- Assign pair partners with similar experience - In her research on the effectiveness of pair programming compared to other forms of collaboration,3 Colleen M. Lewis found that less experienced students may not engage actively in the task if partnered with a student with much more experience. They are more likely to passively watch their more experienced partner code and are less likely to ask questions when their partner does something that they do not understand. However, when less experienced students are partnered with students closer to their experience level, they are more successful in project assessments. Assign partners that have similar coding experience, and switch partners often to provide a scenario where all students are empowered to participate actively. For example, partnering two students who are new to VEXcode VR could be a better experience than partnering a student who is new with another who has already completed several VR Activities and challenges.
- Define roles with your students - Ensure students have a clear understanding of the responsibilities of each role, so that they can actively participate in the project and to prevent conflicts within partnerships. Have the responsibilities posted and review them with students before they begin a pair programming session.
- For example, If students are working on a VEXcode VR Activity, the driver should be building the project in VEXcode VR and describing what they are doing and listening to the navigator’s suggestions, while the navigator is troubleshooting and checking that the project is achieving the goal as written in the VR Activity, and sharing suggestions.
Switch roles frequently - It is essential to switch roles often with pair programming so that students can gain the benefits of each role, and to ensure both partners are actively engaged in the task. Attention may stray when students are not driving, so the goal is to establish a time interval that will keep both the driver and the navigator on task. How often you switch roles will depend on the attention span of your students. Start with 5-minute intervals, then shorten or elongate the time interval based on the performance of your students.
Establish a role switching routine and practice it - Like other classroom routines, how and when students switch roles needs to be defined and practiced. Clearly defining this routine will ensure smooth transitions and enable students to focus on the coding. For example, set a timer for the established interval, and have a visual cue for role switching. When the timer sounds, the pair partners can switch seats and refer to the visual cue when needed. As students gain more experience and confidence with pair programming and role-switching, pull back rigid time intervals and allow them to switch roles at their own pace.
- Encourage positive communication and collaboration - Provide students with a clear understanding of the type of discussions that are encouraged with pair programming. One way to establish a clear boundary is to establish pair programming norms. Co-create the norms together with students to increase student buy-in, post them in your classroom and refer to them regularly. The following is one example of how you can communicate the ground rules for pair programming in your classroom.
- Establish a problem-solving strategy for students - Creating a familiar problem-solving process can help students identify problems and move forward independently, thereby minimizing disruption and frustration and promoting resilience. Try using the following problem-solving cycle to help students troubleshoot their projects and come up with their own solutions. For more information on ways to help build resilience for problem-solving and challenges, see this article. While the article focuses on STEM Labs, the strategies identified can easily be applied to pair programming in a variety of contexts.
- Troubleshoot in pairs - Establish a procedure for students to ask their partner first before involving the teacher when problem-solving and troubleshooting. For younger students, it can be helpful to have a moniker like "try 3 before me" where the students should try three possible solutions before asking the instructor for help.
Practicing pair programming creates an opportunity for students to collaborate, build on each other’s expertise, and have fun learning together. Imagine a Computer Science class where the room buzzes with spirited discussions between ‘drivers’ and ‘navigators’ on the best way to approach a coding task. Pair programming encourages students to collaborate and solve problems, and take ownership of their projects. When scaffolded and practiced regularly, pair programming can provide an enjoyable experience for both students and educators.