3 ms·
> In that case, an alternative to extensive testability is to design the code in such a simple way that there isn't many places for bugs to hide. I like this a
by plagiarist 2y ago
> In that case, an alternative to extensive testability is to design the code in such a simple way that there isn't many places for bugs to hide.
I like this as an ideal. But I struggle to see how code can be both so simple that it is hard to make a mistake and also difficult to unit test.
Most of what I have seen forcing tests to be overly complex and brittle has been coupling code that have very different responsibilities (for example, testing business logic requires testing UI components that perform it). Separating those out would have been better design and more testable.