Intro to Pair Programming
Contrary to the perception of coding as a solitary activity, there is actually great benefit in learning to program with others. This practice of “Pair Programming” has a difficult learning curve but can be an effective way to catch bugs and errors in programs as they’re being written. Additionally, it allows for the application of combined knowledge while first creating a program — a two-heads-are-better-than-one mentality.
Pair Programming works by establishing two roles: the driver and the navigator. The driver’s hands are always on the wheel (the program) while the navigator is providing the direction (laying out and explaining the code that will allow the program run).
This driving-a-car analogy extends not just to the two roles, but also to the potential pitfalls of this practice. Driving with a navigator requires trust, and so does pair programming. It may seem counterintuitive, but the driver is not actually leading the action — the navigator is. As the driver is preoccupied with the implementation of the code, the navigator keeps an eye on the road map and plans the path forward. Therefore, the purpose of pair programming is defeated when the driver forges ahead of the navigator, or when the navigator communicates tentatively (or not at all).
The benefits to the program itself are great, as mentioned earlier: faster debugging and a greater wealth of knowledge to pull from. However, one might argue that the lone programmer can create the same program (albeit slower) if said programmer preferred a go-it-alone approach. What benefits, the lone programmer might ask, does pair programming bring me that more time does not?
To that, I offer this: Pair Programming lends its greatest benefit not to the program itself, but to the programmer. Pair programming puts the driver inside the head of the navigator and provides a unique experience: the opportunity to witness the problem-solving logic of another. While the driver is learning from this different approach, the navigator is able to bolster communication skills and develop quicker and big-picture thinking. Both driver and navigator are able to benefit professionally and enhance their skills through this practice, making pair programming a unique educational experience. These roles are not static, and it’s beneficial to experience both sides of the process.
