General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
George Helyar
Continuous Delivery
comments
Comments by "George Helyar" (@georgehelyar) on "You ONLY Get Code LIKE THIS With TDD" video.
Sometimes I write test first, sometimes I write test after. It really depends on how exploratory the code I'm writing is. At the extremes, if I'm writing code to explore several approaches to see which one to go with I generally don't write tests first because most of it will be thrown away immediately, but I'll pick an approach and ensure it covers everything it needs to cover by writing tests. I'm really just writing prototype code at this point to think through the problem and what the possible solutions might be. You can do that test first but really only with very high level tests, because the scope of the refactoring is so large. On the other end of the spectrum, if I'm fixing a bug I will always repro the bug in a test first and then fix it. Just use whatever tool makes you most productive at the time.
3