How do you Pair Program?

Photo by Alvaro Reyes on Unsplash

What is Pair Programming?

Pair Programming is a software development technique in which two developers work together on the same codebase simultaneously. That, as a higher level explanation, may seem obvious, but Pair Programming as a practice can take many different forms. I’ll split up methods of Pair Programming into two broad categories that I’ll call “Practice Pairing” and Objective Pairing”.

Why is Pair Programming Useful?

Generally speaking, it seems as though the learning process of programming entails a vast majority of time where you are the sole developer working on a problem. Once you begin working in the tech industry, that is rarely the case. Whenever I get a chance to ask professionals about what their day to day life is like on the job, I inevitably hear about their team and their interactions with their teammates.

Photo by Annie Spratt on Unsplash

How does one Pair Program?

This question is the meat and potatoes of this whole post, as there are a few sub questions that I want to address within this section. After a brief discussion on roles, I’ll split this long extended answer in to subsection, talking about Practice Pairing for the initial answer, and Objective Pairing for the rest.

Pairing Roles

Traditionally speaking, Pair Programming splits up into two roles: Driving and Navigating. The driver, much like in a car, is the person who has hands on the problem. They are the one with their hands on the keyboard writing the code. The navigator, again much like in a car, is the one making the decisions on where to go and what to do. They tell the driver what code to write. Sometimes these roles dissolve and both developers act as the driver, working on editing the same codebase from two separate machines. I’ll discuss how that looks later on.

Practice Pairing

When should I Practice Pair? Practice Pairing can occur as soon at any stage in your learning process and is a great way to get used to working with another person on the same codebase, something that might be surprisingly difficult for some. Some of that difficulty might include some semblance of performance anxiety, the fact that up until your first pairing session, you haven’t received live feedback on your thoughts and ideas with regards to coding. Hearing someone agree or disagree with your ideas might be a little jarring at first. Another thing that might be difficult is the process of ceding some of your control over your code. Up until your first pair you’ve been in 100% control of your code. For someone that feels confident in their own abilities, it might be difficult to approach a problem from a different angle than you would have on your own.

Photo by Marten Bjork on Unsplash

Objective Pairing

When should I Objective Pair? So you’ve spent all that time practicing and now you’re ready to pair program on some production code. Incredible. I’ll cover three situations where Pair Programming can be handy.

Photo by Tool., Inc on Unsplash
Photo by Marvin Meyer on Unsplash

Conclusion

By now, I hope that it’s clear that Pair Programming is a useful skill that can help move production along in many scenarios. Whether your pairing to practice or pairing for production, working with a partner can help you learn things and write better code faster. There are many tools out there to help you Pair Program which means that getting started is easy. If you have any interest in moving forward into the industry of software development, Pair Programming is something that you’ll see early and often.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jake McCambley

Jake McCambley

Learning to code by teaching others — Living at the cross section of tech, music, and the outdoors — Currently studying Web Development at Practicum by Yandex.