Surprise: Software architecture is about trade-offs. Independently testable code is great, the complexity often required to achieve it isn’t
4
30
23
@stilkov don’t understand about excess complexity from making code testable. Examples?
2
Replying to @sf105
@sf105 E.g. having interfaces for every single class, even those that only have a single implementation. More generalized: extra decoupling.

Apr 27, 2014 · 11:05 AM UTC

5
Replying to @stilkov
@stilkov agreed. Naive interface per class bad, but rather a sign of weak design skills. Testability isn't the problem. Also ...
1
@sf105 true. But in any case, testability, while being a desirable property, is just one of them, and comes at a cost. As does everything.
2
Replying to @stilkov
@stilkov Testable code does not require an interface for every class. I can equally argue tests help keep code focussed @sf105
1
1
@AgileSteveSmith @sf105 I agree and I’m not saying it’s necessary. It’s being done all the time, though.
1
Replying to @stilkov
@stilkov if interface per class is your worst problem, you're ahead of the game :)
Replying to @stilkov
@stilkov it's not about num of implementations per interface, but about expressing relationships. Too few interfaces also problematic.