Pair Programming – An Extremely Agile Practice

Pair Programming - An Extreme Programming Agile Practice.Pair Programming. It’s probably one of the most extreme practices of eXtreme Programming (XP). It’s an area of agile software development that polarises opinion.

The concept is simple enough. Two developers work side by side on the same piece of work, sharing a keyboard and screen and working together to produce the code.

The main advantage of pair programming is usually cited as improving quality, which also improves productivity further down the line.

Another advantage is spreading knowledge, as at least two people will know each area of the system. And it can also help with skills development – a kind of coaching and mentoring technique with one of the pair more experienced than the other.

It’s also possible to benefit from the theory that two brains are better than one. A simple way of explaining this is that two people have very different experiences. One may see a solution that the other doesn’t. It’s possible that two minds might lead to solutions that are quicker to implement and simpler to maintain.

Even without pair programming, it’s quite common for two developers to work together when they hit a particularly thorny problem. It’s usually a little while before someone declares they are stuck and asks for help. With pair programming, this situation doesn’t really arise, so time is not lost with single developers perservering on their own.

The other area it can help with is motivation and retaining focus. Someone is much less inclined to become distracted and spend time on facebook, for instance, when they are working with a colleague.

The motivation advantage reminds me of DIY in my case. I hate DIY! I will put it off for as long as possible. I’m simply not interested enough, so it doesn’t get done. My solution to this? Invite my father-in-law round! Once he’s in, he’s so keen to get started, and I have to get it done because that’s why he came over. He gets me started and keeps me focused. Hopefully you don’t have wide-spread motivation problems in your team, or you have deeper problems to worry about! But we all go through short periods like this, and pair programming keeps them to a minimum.

On the other hand, pair programming also has some disadvantages.

In the short-term, there is a loss of productivity, or at least perceived productivity. You have to have sufficient budget to put two developers on each piece of work. If your team needs specialist skills, you have to have a team where there are at least two people with each major skillset. And when you need to hire another person, you ideally need to hire in pairs.

I think it’s also important that the team members have the right chemistry. That they spark off each other. And can work closely together without differing opinions causing endless frustration. There’s a loss of autonomy, having to explain everything and constantly build concensus. Sometimes you’ll be constrained by your partner; other times they may be going too fast for you.

This reminds me of back-seat drivers. It’s so annoying when someone sitting beside you keeps interfering and just won’t let you drive how you want to! It’s tiring and frustrating.

These are important soft-factors that can make or break pair programming in practice.

In the end then, like many agile development practices, you have to look at the unique circumstances of your team, and understanding these factors, decide for yourself when and if to adopt pair programming.

There is currently a discussion on pair programming on my new Agile Community. If you have something to add, why not go and join in?


Photo by kurtthomashunt

4 Responses to “Pair Programming – An Extremely Agile Practice”

  1. Pawel Brodzinski says:

    There's one more issue with pair programming. If your team doesn't believe pair programming actually works and improves performance they'll most likely prove this.

    This kind of cooperative work requires specific mindset of both engaged persons. Otherwise you lose much, if not all, of value pair programming can bring.

    The problem is rather painful since typical developer has never programmed in pairs and is rather skeptical. That's why if your team programs in pairs you should recruit new people very carefully.

    By the way: I gave developers much freedom to choose practices they follow in a couple of teams I led and they never even tried pair programming. I can't even remember if anyone was enthusiastic about the idea.

  2. Ilja Preuß says:

    I don't share the experience that for Pair Programming you need an extra budget. I also don't see why you'd need more people with special skillsets – in fact, I'd argue that exactly the opposite is true. Regarding hiring in pairs, I've never seen that being necessary.

    It's true that pair programming can be socially challenging. I wouldn't throw out the baby with the bathwater here, though: it's a skill that can be learned, and from which you will highly benefit outside of pair programming, too.

  3. Dave Hopkins says:

    Great Article. I found it very interesting, and I've actually tried it myself with fair results. One thing I've found (As Pawel Brodzinski said above) is that, like anything else, if your thinks something wont work, they may create a self fulling prophecy of failure.

  4. clutterfreecoding says:

    Thanks for posting this. Very inetersting. I have recently found another site, which expresses rational software development in pictures

Leave a Reply

What is 2 + 6 ?
Please leave these two fields as-is:
Please do this simple sum so I know you are human:)

There are 101 ways to approach anything.
To find the best way, sometimes you need expert help

What People Say

“Kelly revolutionised the way our digital department operated. A true advocate of agile principles, he quickly improved internal communication within our teams and our internal clients by aligning our business and creating a much enhanced sense of transparency in the decisions the business was making. Kelly also introduced a higher sense of empowerment to the development teams...”


“Kelly’s a leading program director with the ability to take charge from day one and keep strong momentum at both a program and project level driving prioritisation, resourcing and budgeting agendas. Kelly operates with an easy-going style and possesses a strong facilitation skill set. From my 5 months experience working with Kelly, I would recommend Kelly to program manage large scale, complex, cross company change programs both from a business and IT perspective.”


“Kelly is an extremely talented and visionary leader. As such he manages to inspire all around him to achieve their best. He is passionate about agile and has a wealth of experience to bring to bear in this area. If you're 'lucky' he might even tell you all about his agile blog. Above all this, Kelly is great fun to work with. He is always relaxed and never gets stressed - and trust me, he had plenty of opportunity here! If you get the chance to work with Kelly, don't pass it up.”


“Kelly is an Agile heavy-weight. He came in to assess my multi-million $ Agile development program which wasn’t delivering the right throughput. He interviewed most of the team and made some key recommendations that, when implemented, showed immediate results. I couldn’t ask for more than that except he’s a really nice guy as well.”


“Kelly and I worked together on a very large project trying to secure a new Insurer client. Kelly had fantastic commercial awareness as well as his technical expertise. Without him I would never had secured this client so I owe a lot to him. He is also a really great guy!”


“Kelly came to the department and has really made a huge impact on how the department communicates, collaborates and generally gets things done. We were already developing in an agile way, but Kelly has brought us even more into alignment with agile and scrum best practices, being eager to share information and willing to work with us to change our processes rather than dictate how things must be done. He is highly knowledgable about agile development (as his active blog proves) but his blog won't show what a friendly and knowledgeable guy he is. I highly recommend Kelly to anyone looking for a CTO or a seminar on agile/scrum practices - you won't be disappointed!”


“Kelly was a great colleague to work with - highly competent, trustworthy and generally a nice bloke.”


“Kelly was engaged as a Program Director on a complex business and technology transformation program for Suncorp Commercial Insurance. Kelly drew on his key capabilities and depth of experience to bring together disparate parties in a harmonised way, ensuring the initiate and concept phases of the program were understood and well formulated. Excellent outcome in a very short time frame. ”


“I worked with Kelly on many projects at IPC and I was always impressed with his approach to all of them, always ensuring the most commercially viable route was taken. He is great at managing relationships and it was always a pleasure working with him.”


“I worked with Kelly whilst at Thoughtworks and found him to be a most inspiring individual, his common-sense approach coupled with a deep understanding of Agile and business makes him an invaluable asset to any organisation. I can't recommend Kelly enough.”


“Kelly was a brilliant CTO and a great support to me in the time we worked together. I owe Kelly a great deal in terms of direction and how to get things done under sometimes difficult circumstances. Thanks Kelly.”