Blog post series
This blog post is part of a series about pair-programming games. To read about more please click see more sessions on pair-programming games.
- Make the team members that always disagree try to build up on top of the ideas already presented.
- Some members of your team are very stubborn and you want to show them that there could be other solutions than their own.
- You want to improve solutions immediately when you see a smaller or larger improvement option.
- You want beginners to feel they add value when pairing with more experienced people.
When working in pairs none of the pairs is allowed to delete the code of the other person. We are looking for a common solution, that both of the pairs will agree.
Why? Often I see that the more experienced programmers drive and give their solution as the best one (and sometimes as the only one). But even if you are not experienced, either with the specific language or framework or generally, you might have some good ideas for making the current solution better. In order to work on that attitude you can do ping-pong pairing with the rules Yes, and…
So the rules are:
- none of the pairs can delete the code of the other.
- at each step when switching from driver to navigator one needs to improve the existing solution and tests.
- whenever one of the pairs tries to delete the code, the other needs to say “You should improve the existing one. Please go back and say Yes, and… I will do…“.
- none of the pairs are not allowed to be angry on this request of not deleting code.
- only unused code can be deleted, like for example after refactoring the code is not used any more. Both of the pairs must agree that the code can be deleted.
Sessions on this topic should be short, around 30-60 minutes. The first sessions should be supervised by a coach who will make sure the rules are understood and well respected. These sessions might become tiring, so make sure you choose a period of the day when you do not have other hard things to tackle.