Mythicant Games

On Pair Programming

Published • April 30, 2024

In an online community I'm a part of, recently someone was asking some questions about pair programming. Specifically they were asking about how to get started with pair programming, how to influence their team/org to adopt it, as well as generally why they might want to do pair programming. I thought I'd take a crack at answering those questions and share my thoughts on the topic.

As a little context, I've done primarily pair or mob programming for the last 12-ish years of my software development career. For the 10-ish years before that, I was working primarily solo coding, with some occasional collaborative work, but nothing I would consider dedicated pair programming.

Getting Started

I want to start with the question "How Do I Get Started with Pair Programming?"

How Do I Influence My Team/Org?

This one can be hard. Influencing people (even ourselves) to change their behavior is hard even at the best of times. For general guidance on influencing change, I'd highly recommend the books Fearless Change and More Fearless Change. Both are excellent.

A lot of the items from the Getting Started section above are your best bet. Achieving small successes and progressing from there is almost always more likely to succeed than any kind of big bang approach.

It may be worth doing some initial investigation to see if there are areas of the management hierarchy that are vehemently opposed to pair programming. Supportive leadership can be a great asset in adopting pair programming, but leadership that is against it can kill it just as quickly.

Why Would I Want To Pair Program?

And finally, why would you want to pair program at all? Isn't it a waste of time? Couldn't two people working separately work twice as fast as two working together? Isn't it uncomfortable always having someone looking over your shoulder?

There definitely can be some downsides to pair programming, especially when implemented poorly or when working with an incompatible partner. But for me, I've found the pros to outweigh the cons. Here are some of those pros as I see them:

Conclusion

Pair programming can be hard, especially if you're just starting out with it. It can be uncomfortable. At least one other person will see the messy, sometimes wandering way you get the results that you do. You'll probably have to say, "I don't know" more than you do when you code on your own. And you'll be amazed and embarrassed at how you lose all ability to type when another person is watching.

But for me at least, working through that discomfort has made me a better developer. That's not just because of the benefits I've experienced with pair programming. But also because going through that discomfort makes me humbler and more empathetic as a human being.