4 ms·
>As a side effect it also meant that the functions I was writing became smaller (easier to test) and it became easier to see what the end solution might look li
by unimpressive 8y ago
>As a side effect it also meant that the functions I was writing became smaller (easier to test) and it became easier to see what the end solution might look like because I could understand the intermediary steps more easily.
I definitely use "it's hard to test this code" as a smell indicating refactoring is in order.
I've never tried TDD, but I suspect most of the value is that it forces people into practicing separation of concerns and other basic anti-ball-of-mud practices.
- jacques_chester 8y agoThis is true, but you still go through a painful process of learning what that actually means. My early sins included happily relying on field injection in Spring (don't), happily blasting stuff into Ruby objects (don't), mocking my software's world into an unrecognisable comic book universe of gravity-defying nonsense (don't) and so on. A common criticism of TDD is that poor tests make things harder to change, not easier, and I believe it, because I have absolutely done that.