Editorials

Pair Programming

Pair Programming

Pair programming is a software development technique where two programmers work on the same task together. Most people think this is a waste of resources resulting in less delivered code. I agree that the concept is counter-intuitive, and the practice does not fit all occasions. Here are some reasons I find it can actually increase production beyond that of two individuals. The reason is that you are combining other essential tasks you need to do into the act of writing software.

Pair programming, if combined with test driven or test first development techniques allows two developers to work together. Often one developer will write a test. The second developer writes code implementing the requirements of the test, until it passes. Then they switch roles.

When two developers work on the same code together they are able to focus more efficiently on writing the software. There is less distractions from IM or Email because you have someone else sitting at your desk. Breaks are often needed to allow individuals to catch up on Email, etc.

Pairing provides a great opportunity for collaboration and mentoring. Pairing a seasoned developer with a more junior one, or a developer who knows a section of code intimately with a developer new to the code base is a great way to transfer knowledge of the business, the code base, or software techniques and patterns.

Because you are pair programming, it can sometimes be used in place of code reviews.

Pairing reduces the risk of harmful code. Malicious code must be agreed on by two individuals in order to make it into the system, which is less likely to occur.

What are your thoughts or experiences with pair programming? Some people really don’t like it. Others find it is a great way to code. Get into the conversation by leaving a comment below, or drop an Email to btaylor@sswug.org.

Cheers,

Ben