Blog

To Pair or !Pair, That Is The Question

Pair What?

If you’re at all involved in software development, you’ve likely heard of pairing or pair-progamming at some point. Pair-programming is the practice of two programmers working to write code at a single workstation. There are a number of tools used to facilitate this, both for remote pairs and local pairs, which we’ll dive into in another blog topic for another time. But for now, we want to share our philosophy on pair-programming and why we do it here at Quick Left.

Reasons we love pairing

Let’s dig into a handful of reasons that we love to pair-program. It’s a practice that’s been around for many years, and yet there is still trepidation to jumping feet first into pairing, both from developers and from managers and those in leadership roles. People often ask “How can 2 people working on 1 task be better than 2 people working on 2 tasks?” There has been found to be an approximate 15% overhead to pairing [1], but the resulting code has at least 15% fewer defects, which is significant when you consider the cost of a bug going into production and the downstream costs to get it fixed, not to mention the cost to your brand when customers aren’t satisfied with your product due to bugs.

Laser Focus

This is a pretty easy benefit to understand and get behind when you stop to think about it. How often throughout the day are you getting distracted by your social media channels? We all know that your Aunt Edna loves posting cat videos to your Facebook wall, but is that really where your focus should be when you’ve got bugs to slay? Pairing helps with focus and problem solving, because you’ve always got another perspective and a second set of eyes on the problem which is helping to keep you focused on the task at hand. We’re in the business of solving tough problems for clients, and we strive to get to the best solution, not the first solution. In our experience, getting to the best solution happens quicker in a pair-programming environment than when a lone developer tackles the problem.

“On-The-Fly” Code Reviews

As consultants, we’re working with clients big and small in a myriad of environments with a myriad of different SDLC’s. Because of this, we prefer the pairing model in order to facilitate realtime code reviews that are guaranteed to be taking place. In a typical process, code reviews may or may not be performed by someone familiar with the specific area of code being worked on and they may not understand the intent of what is being developed. When pairing, your pair partner is aware of the problems being solved and can give a more educated review of the code while it is being written.

Opportunity to Constantly Learn

For our developers, writing code is a craft. When you love doing something this much, you constantly strive to improve. When you participate in pair-programming, you are in constant learning mode; everything from code concepts to editor shortcuts [1]. Our clients are paying for and expecting the best developers, and providing pairs of developers leads to better knowledge gain and knowledge transfer because every developer is bringing their experience to bear on the problems for any given client. Not only are our pairs gaining knowledge from one another but they are continuously passing that shared knowledge on to the teams they work with. This helps facilitate cross-training and ultimately results in us leaving our clients better prepared to maintain their product.

Sounds Awesome, Can You Teach Us?

At the end of the day, we’re here to help our clients be successful. We take the approach of always trying to leave things better than when we found them, and this includes teaching people about the benefits and the awesomeness of pair-programming. It can be a tremendous morale boost for your developers, as well. Humans naturally want to celebrate their successes, and it’s a great thing to see a pair give each other a solid high-five when they’ve overcome a particularly challenging problem together. If you’re interested in learning more, we’d be happy to talk to you about what a project engagement with Quick Left looks like!

What have your pair-programming experiences been? We’d love for you to share your stories with us!

References & Resources to Learn More

[1] Alistair Cockburn & Laurie Williams, The Cost and Benefits of Pair Programming

[2] Laurie Williams & Robert R. Kessler, Pair Programming Illuminated