Doubles the effort? It may not what you think!
3 min read
In pair programming, two developers work simultaneously on one source code. The method helps to develop better software products.
At Netresearch, we use this method and derive many advantages from it:
- Direct knowledge exchange about methods, tools used and ways of working.
- Improvement of code quality through direct code review, which leads to more robust code.
- Improving collaboration through communication
- When you have to describe approaches verbally, new ideas come up and thinking errors are noticed.
- In dialogue, the best solution can be found.
- A shared sense of achievement makes people more satisfied with the result.
In the short term, you might think that you need twice as much development time for a feature, but in fact, the elimination of a code review, the exchange of knowledge and the more robust code do not result in additional costs in the long term.
The strong feeling that you are desperate to get to the keyboard because you just can't seem to describe the problem in a way that your co-pilot understands. This can take years of your life and lead to grey hair! Also, your nails may break if you grip the seat cushion of your office chair too hard.
You and your boss are convinced, and you wonder how to start? There are a few rules for pair programming that you should follow:
- Switch keyboard control at least every 15 Minutes. It helps that both programmers are on track, the hole time.
- Writing code is accompanied by language.
- You have to pinch yourself to say, "I'll do it quickly".
- Pair programming is not a must. Sometimes there are routine tasks where knowledge cannot be shared.
- Tidy up your desk to prepare that you are not alone.
- If your meat each other in real life, take a shower in the morning :D
Pair programming remotely
Sitting together at a computer is probably the most beautiful thing of all. Probably many stock photos were taken during pair programming, where one of the developers smiles and points at the monitor. Something silly like that ... or this ! tsss ...
But how does pair programming work when the workplaces are kilometres apart? There are a few techniques for this, such as git handover, but what I would like to introduce today is Code With Me by JetBrains.
One day I actually read through one of the tips that pop up when you open Android Studio / WebStorm / PHPStorm / RubyMine / PyCharm / GoLand / CLine or another derivate of IntelliJ IDE and discovered this feature. There are already several other editors that allow you to work together on a file, but with Code With Me, JetBrains from the Czech Republic has taken it to a new level.
- Invitations to a pair programming session via a link,
- control of access rights,
- audio and video chat are also integrated.
- A follow-up mode, in which you can also follow when your partner opens a new file or scrolls down.
You can start a pair programming session by clicking on the user icon in the top right-hand corner.
I don't want to repeat the prejudice, but you should know them if your project manager counter-argues with the following arguments in order to be prepared. The prejudice "One problem to solve + two programmers working on it = twice the effort" is false. You improve code quality, which mean at least less bugs. You share knowledge and improve your communication skills.
Have you ever tried couples programming or even mob programming at regular intervals? What are your experiences with it? How have your bosses reacted?