Pair Programming

Pair Programming

Jayaprakash D B
1st Mar, 2019

Pair Programming

Pair programming is a strong tool kit in extreme programming’s toolbox.  Two programmers work on the same workstation one wearing a driver’s hat and the other one wearing an observer’s hat, exchange their roles at frequent intervals of time that they agree upon, and steer the program to its conclusion. The dual perspective on the same problem is at the core of this technique. Though there are two brains working on the same problem, they should have a conscience to collaborate and not compete. While the implementation is on its way, the same is being reviewed as its being written. So it saves a big time on future defects and code review requirements while engaging two people on the same task.

It’s important to have some house rules for any such collaboration happening to achieve a task to its done state. Teamwork is as challenging as much is efficient. Still, there’s no need for a handbook for these rules. It’s the best practices that learned during the journey. We inspect and adapt, we discard a few rules as we feel them redundant or destructive for our goals, and form new ones to make our pair programming more fruitful.

To list an example of such a rule, we sometimes get carried away in the midst of the task that we start feeling possessive to hand over the precious piece of code that we are coding, to the pairing person. This slowly sweeps into the division of the module that we are coding. This obviously kills the very purpose of pair programming. We do have time bounding to make the perspective neutral. Switching may at first seem inefficient but would reap on as it continues.

The quality of the code is high as the defects are identified during development. Pair programming demands readability implicitly to the process as the navigator needs to read the code when the driver implements it. Readability is a prerequisite for the newbie working on the code during maintenance. Firstly the maintenance cost of such code is very low above if this requires extension by new hands handling this code, it would come out naturally without any pain to understand the code.

Connect with our experts through 1-on-1 coaching. This is just a speck of knowledge on your journey to becoming an expert in the industry. If you have any doubts or require career guidance, feel free to connect with our Industry experts and trainers for 1-on-1 coaching.

Don't Miss Out

Get latest updates about new and exciting opportunities delivered to your inbox

Publish Your Blog

We are inviting authors to write blogs. If you are interested in writing and sharing your knowledge as blogs, get in touch with us.
Submit your blogs to