About
The third episode of this #RemotePairProgramming series is about Strong Style Pairing. My coding pairing partner this episode is Michel Daviot.
Strong Style Pairing
During Episode #002 Llewellyn was the Navigator in a Strong Style Pairing way. This episode I will be doing the same, but with my style. But there is also a challenge, given by my driver: Michel.
The Challenge
I don’t know at all the problem, and I have never heard of it. So I need to be navigating in a Strong Style Pairing without knowing the problem. So my solution is to go in small steps, to minimize the risk.
The Problem
Scientists have sticks of different length and ants that walk on the sticks. When there are more ants, they collide on the stick and both ants change the direction. We need to compute the time each ant spent until reaching the end of the stick. During the codecast we need to model this problem using TDD and Strong Style Pairing. Adi is the navigator and doesn’t know the problem, while Michel is the Domain Expert and the driver.
Behavior Slicing to the Rescue
Alex invented the concept of Behavior Slicing when starting to teach the Unit Testing Workshop, created for Mozaic Works.
We look at inputs and outputs for a specific context. It is a method of analysis that helps you understand which tests to write and their order.
Focus behavior: AntSolver.solve()
Input Output
no ants time = 0
one ant, zero length stick time = 0
one ant, one length stick time = 1
… and so on.
If you want to see me use Behavior Slicing in TDD as if you Meant It – Episode 1: Think -> Red -> Green -> Refactor
To learn by doing you can join our Unit Testing and TDD workshops.
Evolutionary Design Baby Steps
I am trying to introduce only one design concept at a time during this exercise. The reason is that I don’t know at all the problem, so I want to go in small steps and understand the natural connections between the design concepts. I call this attitude: Behavior Slicing with only one notion at a time Evolutionary Design Baby Steps.
Video
Acknowledgements
Many thanks to Michel Daviot for taking the time to record this codecast with me.
What’s Next?
Read more about Strong Style Pairing: http://llewellynfalco.blogspot.ro/2014/06/llewellyns-strong-style-pairing.html
Check the previous episodes of #RemotePairProgramming: