Tdd Is Hard but Worth It
FleetingWriting software piece by piece and seeing its shape appear almost like it came from nowhere is kind of thrilling.
In TDD, in particular the red/green development part, you first think about what you want to achieve, try to describe it in a programmatic way, then see it not work and then create the program that make it pass.
In this case, you don’t directly see the shape of the program appear. You first think about this shape. Actually, both the test and the code evolve together, because you definitely cannot create a decent test with 0 code to test.
It is worth it because this exercise forces you to get into the shoes of whomever will get the code. You start having expectations about the code that would not have been trigger if focusing on the code in the first place. Its harder to have those expectation once the code is there, because of the curse of knowledge and the retrospective bias.