Last weekend I had the pleasure to attend the TDD Workshop that Jason Gorman organises in London. Being myself a passionate TDD practitioner with years of experience I still found the workshop really interesting, having the opportunity to learn a few new things and reaffirm my ideas.
Sharing below my notes from the workshop:
– Demo 1 – Fibonacci Sequence.
– Classic mistakes of TDD
– Start with the production code.
– Test testing too many examples.
– Basic moves of TDD.
– One or two design decisions per test.
– Using it in the test is how you know you need it.
– Why is good/useful to see the test fail?
Mainly to have confidence going forward that the test will catch if someone breaks that code.
– The purpose of TDD is not to the test the code.
– TDD is about specification.
– Whenever you work, do baby steps, don’t stay in red for more than a few minutes. Go green as quick as you can.
– Looking at the history of a code base (using source control) can help to understand a legacy system.
– We have not finished yet because we can still think of more examples.
– Work backwards write assert first.
– Eclipse was design to do TDD to work in a backward way. Visual Studio is not like that.
– Kent Beck calls the Model Code vs Test Code.
– Having the class we are implementing in the same file that the tests breaks the SRP.
Continue reading “Attending Jason Gorman’s TDD Workshop – 1/12/2018”