Pair programming is a programming method in which two people work together on a single program. The first person is the “Driver“, who writes the code, the other person is the “Navigator” who reviews each line of code as it is typed, checking for errors. They exchange their roles on a regular basis.
In the book “Pair Programming Illuminated”, Laurie Williams and Robert Kessler describe pair programming as a programming style in which two programmers work side by side on a computer, continually collaborating on the same design, algorithm, code, and test.
When a program is developed in a pair, the Navigator continuously inspects all the code that is produced. This continuous inspection is an opportunity to spot errors early and reduce defects in the finished product. This results in better collaboration, greater quality, better code, and sustained better development practices. It enables learning and sharing of information among developers, and in general, two people thinking about the same problem can create simpler and more effective solutions and scenarios. As the saying goes, ‘Two heads are better than one.’
Pair programming also contributes to the robustness of the team, because the constant exchange of roles and knowledge minimizes the impact the loss of a team member has on the team.
Some advantages of pair programming are as follows:
In a survey conducted by the “Department of Software Engineering and Computer Science at Blekinge Institute of Technology – Sweden”, “96% of the pair programmers reported that they enjoyed working in a pair programming environment than working alone. “
If you have never tried pair programming activities on your team, it is worth a try. It makes work a lot more fun and facilitates better communication between the team. This is certainly a benefit, as anything that is done with satisfaction and diligence tends to increase productivity and yield better results.