Test Driven Development by Example

After taking LeSS course with Craig Larman, my mindset toward coaching teams has changed. I inspired to include coding practices alongside my liftoffs. That’s how I started to do a lunch & learn with some teams and introducing them on TDD. The problem I picked was exactly the problem that Craig picked, prime factorization table. It was a very well thought of problem and the way the algorithm will evolve is very intuitive and mind-blowing at the same time. At each step, you are only worried about the test you want to pass and that’s it, the algorithm evolves by itself; of course, driven by tests.

I tried to capture the steps in a powerpoint, to show how we the algorithm of finding prime factorization was evolved from one line to the full algorithm.

What I tend to do in the coding session is to ask for help, to see if there is anyone that wants to help me with coding or even thinking and getting it going. In the last one that I ran, one person got up and sat on my laptop and did the rest of the coding. I then told them this is how a pair programming would look like, at least this is how you can try to begin with.

I found out that Uncle Bob had a very similar approach called it PrimeFactorKata.

Leave a Reply

Your email address will not be published. Required fields are marked *