Pair Programming – Key Topics – Code Complete

Pair Programming
Pair Programming

Pair programming has many benefits for an IT organization. In this post, I will share the contents from the book “Code Complete“.

To begin with, PP is developer collaboration. While one programmer is writing the code, other developers watch it. The watcher checks if the program is written correctly. Also, she/he checks if the right business logic is applied. In general, the title for the writer is “driver” and for the watcher, it is “navigator”.

Keys to Success with Pair Programming

Support Pair Programming With Coding Standards

When a set of coding standards are specified, programmers spend their time on the essential task. Otherwise, arguing about the coding style is a time-waster.

Don’t let Pair Programming Turn Into Watching

While developing, the programmer without the keyboard should be actively participating. The task for this programmer is to analyze the code, think ahead to what will be coded next, evaluating the design and plan how to test the code.

Don’t Force Pairing of the Easy Stuf

For example, one group that is using pairing found that doing the detailed design on the whiteboard for fifteen minutes and then to program solo is more efficient. Most organizations apply PP for the part of an assigned task instead of the whole process.

Rotate Pairs and Work Assignments Regularly

Meanwhile, int the process of a given task, assigning programmers to the different components’ tasks is important for the organization. It propagates knowledge among the development group. Rotate pair assignments regularly to encourage cross-pollination. Also, it is recommended to switch pairs daily.

Encourage Pairs to Match Each Other’s Pace

When one partner goes faster from the other, it eliminates the benefit of pairing. Either the faster partner should slow down or the pair must be rematched with other more proper developers.

Make Sure Both Partners Can See the Monitor

Not being able to see the monitor or using very small fonts can cause problems.

Don’t Force People Who Don’t Like Each Other to Pair

Notably, personality conflicts in pairing can decrease efficiency. It is meaningless to force people who don’t get along to pair.

Avoid Pairing All Newbies

Pairing works best when at least one programmer has paired before.

Assign a Team Leader

It is good to assign one person to coordinate the group of pairing developer. It aids contacting with non-programmers and managing the work assignments.

Benefits of Pair Programming

  • Pairing is less stressful than solo development. Pairs encourage each other to increase quality even when there is time pressure.
  • Surely, the code quality increases to the level of the top programmer.
  • Indeed it increases the development speed. The team spends less time to solve defects at the end of the project. Because there are fewer defects when developed by pairing.
  • It produces many benefits of collaborative construction such as mentoring juniors, spreading culture and enhancing collective ownership.

Conclusion

In this post, I have tried to transmit the topic Pair Programming in the book Code Complete. If you like it please share it. You can write your questions below. Finally, you can read my other post about Secure Development Lifecycle Practices.

Related Post