5 ms·
One of the most pleasurable benefits of TDD is that I can refactor code and not worry that I'm going to break something. On larger projects this is really liber
by ollysb 16y ago
One of the most pleasurable benefits of TDD is that I can refactor code and not worry that I'm going to break something. On larger projects this is really liberating, I can develop with the same freedom that I did on day 1. It means that a code base can evolve smoothly and naturally, assimilating new requirements. Without that safety net you end up with code that gradually becomes a poorer fit for the requirements, changes becoming huge snaps as they are delayed over the fear of regressions.
- felixge 16y agoYes, plus you'll be doing less rewriting because you spend more time and thoughts on getting it right in the first place.
- ddlatham 16y agoIs that specific to TDD or just having a comprehensive suite of tests?
- ollysb 16y agoThere's 2 aspects to it. First, the coverage which gives you the safety net. Second, specifying behaviour before implementation which allows you to maintain tight alignment between your requirements and code as they evolve. According to the BDD guys it's the second aspect that is more important.
- ollysb 16y agoI'm not sure why my comment has been downvoted, it answers the question and to my knowledge is accurate. Perhaps I can expand on something for you?