Test Driven Development Training
Test Driven Development is a particular way to program, which leads to a suite of automated tests being built up alongside production code. The trick is to alternate writing small granularity tests, and just enough code to make them pass. You must refactor the code and tests as you go, to make everything expressive and clean.
The main way I teach Test Driven Development is via the "Coding Dojo", where I take a group of programmers into a safe environment, and lead them through a "Code Kata" exercise. I want to get them to discover the benefits of TDD in somewhat idealized circumstances - with a trivial coding problem, and familiar language and IDE. The idea is that by letting them experience the rhythm and flow of TDD, they will understand the benefits.
First steps in TDD
When you begin with TDD, writing tests first can feel awkward and pointless. There is a while when you're far less productive than you were before, and that can be frustrating. In the Coding Dojo we are in a safe place, where it doesn’t matter if we are unproductive for a while. In fact all the code will be thrown away afterwards. You should feel free to experiment. We're trying to provoke that "aha!" experience where you realize how much the tests are helping you. There's a feeling of safety, of freedom to refactor and clean the code, and a satisfying, steady incremental increase in functionality.
That feeling of safety and progress is attractive - developers want more. If they experience the benefits of TDD in a safe setting, they will be more likely to also practice TDD in production code.
If you’d like to learn more about Test Driven Development, we can facilitate Coding Dojo meetings tailored to your needs. For a team new to TDD we recommend a series of 6 half-day dojos, ideally held two weeks apart, with a group of 5-15 programmers. Please contact us for more information, or download a flyer about our TDD seminar.