P&P Summit Day Three: Micro-Pairing
The last actual session of the day was given by Peter Provost and Brad Wilson. They described a type of game where during paired programming turns into a game where one developer is writing tests and the other developer has to write the code to pass them. They started with the idea that even while groups are adopting agile methodology at a fast rate, most of them do not adopt the paired programming model. Most groups do not seem to grasp just what the paired programming gets them.
What Peter and Brad state is that pair programming is really real code review. Both partners in the pair must be working on the code together, not one guy developing and the other guy reading email.
Here are the keys they see to getting the real time code review (paired programming) to work well:
- They recommend that you pass the keyboard at every TDD step. Once guy writes a test (design the interface basically) then turns it over to the other developer to write the implementation.
- Negotiate over your disagreements.
- The pairing should be changed around at the end of each task or at least enough to ensure that people get exposure to other partners. Everyone gets sick some day so being able to work with other partners is important. They called this promiscuous paring.
They then stop the slides and went through an example of doing this partnership.
They have a test list in their test class. These are basically just comments about what tests they want to implement. This list can grow over time as more tests are thought of.
What followed was a series back and forth where one writes a test and when it fails they pass the keyboard to the person who needs to implement it. If you write a test that passes immediately then the pair switches where the other person previously doing the implementation starts to write the tests. During this programming game there is communication between the people doing the development as each test and implementation is written to ensure they agree with the code.
They also bring up the point that when you have pairs of different levels it is a great learning experience.
I’d really like to get into a project where I can try this out.
On a side note, it’s interesting that Brad Wilson’s laptop is a MAC running Windows XP.