Why Pair Programming?

Geison
2 min readFeb 11, 2017

--

Knowledge sharing

Ultimately, I have been hearing a lot of discussions about pair programming, usually contesting its importance, when it is necessary and if it could be replaced by code review. In this post I will share my thoughts and experiences on it.

Commonly, the results of pair programming are related with code quality but from my experience, I would say for sure that this is not the main benefit of it, for there are 3 other results that are much more important and irreplaceable:

  1. Enabling new members of a team to be productive on the first day of work: Even if technically capable of contributing, new members of a team do not have the context of business domain necessary to fix bugs or develop new features for a product, so pairing with a team developer enables the new member to contribute on the first day and also speed up the onboarding process.
  2. Preventing silos of knowledge: When a team has at least 2 developers working on a given part of the code or business context, it enables developers to have some days off without blocking the team, since there is always be someone else with the necessary context to continue the work.
  3. Unblocking developers stuck in some problem: As developers, there are times we need to solve complex problems and when it happens is extremely beneficial to have another person who helps to find a solution. Just knowing that you are not alone sometimes is enough to give you the courage to face the problem.

Did you realize that the 3 main benefits presented are related to sharing knowledge and not to quality code?

Thus, if you ask me:

What is the importance of Pair Programming?

Answer: Sharing knowledge!

Is Pair Programming replaceable by Code Review?

Answer: No, because code review does not enable new members of a team to be productive on the first day of work, does not prevent silos of knowledge and does not unblock developers stuck in some problem.

When should I use Pair Programming?

Answer: Every time that sharing context or knowledge could help to solve a problem.

Well, that’s it, folks! If you found it useful, click on the heart and share to help to spread the word, and leave a comment below. I will be glad to know your thoughts on it.

Geison Goes
Senior Consulting Engineer at
ThoughtWorks
Email
geisonfgf@gmail.com
Twiter
@geisonfgfg
Medium
@geisonfgfg

--

--

Geison

Software Craftsman, traveller, dog trainer and Husband.