4 ms·
In my experience, that clause is not required. Code that's been designed for easy testing is better code, period. Not just because it's been tested. Code d
by bryanlarsen 14y ago
In my experience, that clause is not required. Code that's been designed for easy testing is better code, period. Not just because it's been tested. Code designed for testing tends to have cleaner interfaces and is better modularized.
- romaniv 14y agoUnit testing can easily lead to arbitrary modularity or code fracturing, which makes code harder to use and reason about. Good code should be designed for solving problems, easy use and readability. If your code is designed primarily for passing code coverage checks, then it probably is not very good.
- cheez 14y agoIt does require a degree of latitude and good judgement. This only comes from experience.