Agile Development with Pair Programming: Just Like Playing Ping-pong (Part 1)

Pair programming is an agile software development tool. However, there are so many opposite opinions surrounding it — some developers love it, while others roll their eyes when thinking about this technique. At Vivify Ideas, we gladly adopted this way of working. Why? Just read the text. Just read it.

What is exactly pair programming?

Pair programming is a relatively old technique but has been popularized two decades ago, by Extreme Programming. Pair programming is a method that consists of two programmers working with each other, side by side.

Developers sit behind the same desk, sharing the same screen, keyboard, and a mouse. The pair consists of:

  • the Driver, the one that is behind the keyboard,
  • the Navigator, the one that provides guidance by watching, talking, asking or making suggestions.

The Driver is the one that is focused on the code — the algorithm, semantics, and syntax. On the other hand, the Navigator’s job is to pay attention to the next technical task that should be delivered, the test they are both trying to pass, the quality of the overall design etc. In so many ways, the Navigator focuses on detecting bugs and problems. Every few minutes or so, programmers change their roles.

It’s really not that complicated, just like playing ping pong.

What pair programming is most definitely not?

In order to make pair programming work, we had to have a clear idea what it was not.

Although it seems like one, pair programming is NOT mentoring. You are probably surprised to read this since some programmers have a different experience.

But, no matter the differences, there are two equal developers in pair programming, working side by side, in order to solve a problem.

Who can be a part of pair programming?

From our experience, you can pair up:

  • Senior and Senior developers,
  • Senior and Junior developers,
  • Junior and Junior developers.

Pairing two Senior developers is the obvious choice. The code will be flawless, and both of them will get a chance to learn even more from each other.

The second option, pairing a Senior and a Junior developer is great because it will provide the Junior one with much-needed knowledge. It is important that the Junior keeps an open mind since the Senior developer has a way of doing things. Here, the key is cooperation. If there is no cooperation, this can easily turn into a mentoring session.

Two Junior developers are like kids in a candy store. Everything seems interesting, new and they are ready to experience it. They will experience it together and answer each other’s questions.

To pair or not to pair, that is the question

Actually, this is not that hard of a question.

Pair programming is amazing for solving difficult tasks. Junior developers can do simple tasks, but if there’s a difficult one, you can choose:

  • Senior developers to solve it,
  • Junior developers in pair/in a team or
  • pairing a Senior and a Junior developer.