3 ms·
In that example I agree with you. I've seen my fair share of bad design with good test coverage. Then I have also seen my fair share of good architectures with
by axanoeychron 12y ago
In that example I agree with you.
I've seen my fair share of bad design with good test coverage. Then I have also seen my fair share of good architectures with no test coverage.
When I see a good architecture with effective testing - that's just awesomeness. I think this is something to endeavour for. I'm not sure how you solve the problem of developers creating bad architectures with heavy test coverage but I don't think pure abandonment of TDD is necessarily the answer (for the alternative which is bad code with no coverage). I do not subscribe to the reasoning that Tests immediately cause a bad design - they definitely influence it but they are not the primary cause.
- dozzie 12y ago> I do not subscribe to the reasoning that Tests immediately cause a bad design Me neither. But tests are given much, much more attention than they are worth. Tests mainly make up for lack of clean structure and good tooling for static analysis. Strong static typing is worth attention. Static analysers and code proof assistants are worth attention. Simple design that make whole class of errors impossible is worth it. Tests are not worth that much in this neighbourhood. Having plenty of tests is OK when the code base is fragile and it's not clear how to make it robust. Tests are a tool of last resort, if all thinking fails to produce something bug-resistant.