One thought on “How To Test Depends On What To Test: Money, Chaining, and Steering

  1. This is a good way to explain it Mike. I do a TDD workshop where we write FizzBuzz as an interactive program and then try to test it. Of course it’s a huge pain in the ass because suddenly you need a bunch of infrastructure to call the interactive program and read the printed output. Then we write it again using TDD and writing an easily tested function, then we wrap that function in a simple interactive program.

    I tell people that TDD will change the way they code – it takes awhile before they catch on that it has changed the way they code. They never regret having learned it.

    This exercise also provide a good way to discuss SOLID and the value of balance. For just a few tests a bit of duplication beats the cognitive load (when reading) of abstracting the tests into a runner that iterates over a set of inputs and asserts. For a lot of tests, it’s a different story. Balance is key in all things.

    Anyway, I quite enjoy your writings and your approach.


Leave a Reply

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