PAIR PROGRAMMING: WHAT IS IT AND HOW DO I DEPLOY IT FOR MY TEAM PROJECTS?
PAIR PROGRAMMING: WHAT IS IT AND HOW DO I DEPLOY IT FOR MY TEAM PROJECTS?
By Jari Meire |Posted on 14 January, 2019
Introduction
Pair programming is a technique that has two developers working on the same task on the same computer. This way of programming is one of the main principles of the agile methodology ‘Extreme Programming’. The methodology was developed by software engineer Ken Beck in 1999. It’s a software development process that centers around communication, feedback and iteration, which is why working in teams is a very important part of it.
What is pair programming?
Basically, in pair programming two programmers will be working on one task simultaneously, with one person (the driver) writing the code and the other one (the navigator) observing and reviewing as the driver is coding, and bringing corrections where needed. They switch positions frequently to make the process more effective. It speaks for itself that this way of working can bring many complications, and that is what we will be discussing in this article.
Variations
There are some variations on pair programming, such as remote pair programming (where, as the name says, developers pair up from different locations, which is certainly possible if both have access to the necessary software and communication channels) and mob programming (which is just like pair programming but with the entire team programming together), but they are similar enough and come with mostly the same problems and advantages as the main technique of pair programming. Pair programming also matches well with other agile techniques (like working in a test driven development environment) because similarly to these other techniques, it aims for a next level quality end product.
This chart shows how collaboration results in more compact code for the same programs. (Chart by Dr. A. Cockburn)
Possible complications of pair programming and how to deal with them
Even so, the practical implementation of this technique can be challenging. Many potential problems may arise, particularly because most developers are accustomed to working by themselves. Knowledge sharing is often not something that occurs much within software teams. With pair programming however, partially thanks to this shared knowledge, the progress and results of one certain part are not dependent on just one person.
When striving to implement this technique successfully, there are some factors that need to be held into account. For example, when composing the pairs, it is important that the different qualities of each team member, like expertise and ego, are taken into consideration. Personalities are also a deciding factor. Some people simply function better as individuals, and will book their successes this way too.
There is no merit in forcing anyone to use the pair programming technique. Developers need to be open to the idea for it to have a chance at success.
How to make pair programming work
But that being said, it definitely pays off to give this technique at least an honest chance. It is definitely possible to implement it gradually or partially, for example by beginning with a pair programming session once a week, or by doing weekly code reviews together.
As you can see, initially paired programmers might take a little longer to finish, but throughout the projects they will get faster and faster, whereas the individual’s times remain constant. (Chart by Dr. A. Cockburn)
Setting standards in advance can really advance the pairing. This way team members can fully focus on their tasks. Supporting techniques such as the pair programming matrix could be used as an extra stimulant. This gives the team a nice overview of who has been paired with whom already and how many times.
Example of a pair programming matrix (Image credit)
The pairing itself won’t always be an easy task, but don’t worry, that’s normal. Difficulties might arise and you might hit some bumps in the road. But Rome wasn’t built in a day either. When applying this technique the right way, it will result in countless benefits and quality results in the long run.
Looking for a developer that could apply this technique to your project? Contact us here.
Are you a programmer looking for a new challenge? Take a look at our career openings here.