I've heard of TDD as an organizational development paradigm, where all developers are asked to let testing drive development, and I've also heard of organizations who don't embrace TDD so long as unit test coverage reaches close to 90 percent for the application. One thing I never hear is why an organization would set a standard for TDD specifically when it is an individual development discipline.
What are the organizational benefits of TDD over functional development backed by unit tests?
agile;unit testing;tdd
The main benefit of using TDD instead of building your tests afterward is that the system tends to be more clean, and by that I mean less coupling, responsibilities where they belong and a clear public API. Testing after the facts tend to produce tests designed to pass, jumping to the hoops that the system imposed (like having to connect to the database because the DAO is coupled with the database code).All in all, I tend to mix approaches: Most of the time I TDD, some times I just code (specially when I'm experimenting) and use tests afterward to clean my mess.