Pair Programming - The why.

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 things on a more strategical level, helps with fresh ideas and asks questions. Both of them should switch frequently.

Pair programming
Pair programming from Syneus Solutions. (CC BY-NC-SA 2.0)

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 offer 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 wan't nice commit messages? Do you want to talk to your Product Manages 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 admininster 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.

You learn a lot during a Pair programming session
Fall 2011 Student Hackathon Coding from @matylda. (CC BY-SA 2.0)

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

Since pairs should switch frequently there is a very good knowedge 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 you're pain.

There are fever distractions in a pai. You do not get distracted from the outside or your own emails that often. And you have a good excuse to enforce you're 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, then 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 ;)