Article

Pair Programming - The why.

A watercolor illustration of two people working on computers at a desk in a sunlit room with plants.

Pair Programming means that 2 programmers work on the same problem together at one workstation. One of them is the driver - the guy who writes the code. The other programmer is the navigator who thinks on a more strategical level, helps with fresh ideas and asks questions. Both of them should switch frequently.

For most programmers this is completely unfamiliar in the beginning. It's not very easy to learn - and it's not for everyone. But learning to pair can be worth it.

Benefits of Pair Programming

Zero friction reviews

Do you do Code Reviews? We at Helpster have the 4-Eyes-Rule: Every piece of code has to be verified by a second pair of eyes.

Pair Programming of course offers just that. You have constant review of your code. And even better: You can directly incorporate it into your code.

Live up to your own standards

Do you have high standards? Do you want to do TDD for example? Do you want nice commit messages? Do you want to talk to your Product Managers more often? Write code that the whole team understands? We do!

Pair Programming is great to live up to your own standards: A good navigator has time to think about all of this. It's so much harder to be sloppy, when you are tired if your pair is watching you ;)

Teamwide learning

I learned so much from my pairs during the last years. Of course you can learn small tricks like using ClusterSSH to administer servers, or a short hand to create new files. But you might also find yourself using Vim and ask yourself how the hell you can work with it.

Often you implement something that your pair wanted and the solution is very nice and elegant - more than any of you two might have achieved.

Since pairs should switch frequently there is a very good knowledge distribution within the team after a while.

Concentration & Relaxation

A good partner can motivate you. Even the crappiest chore looks way better if you have someone that shares your pain.

There are fewer distractions in a pair. You do not get distracted from the outside or your own emails that often. And you have a good excuse to enforce your Pomodoros ;)

It's just fun

Last but not least it's just fun. As a driver you have a navigator that unstucks you all the time and gives you valuable feedback. Even the worst tasks are just done.

It's very intense and rewarding and at the end of the day you end up with code that is much better than what you would have written - but you are also crushed. You go home after 8 hours and feel very good about it.

Conclusion

Pair Programming has a lot of advantages. It's very different in the beginning, but it can be very nice in the end.

Of course there is not only light. But let's cover this in the next article ;)

Want to try it? My short primer on pair programming shows how we do it.

  • pair-programming
  • teamwork

Replies

To reply from the fediverse, follow @robert@rocu.de or look up the address of this post from your account.