Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"Testability" tends to add unnecessary (by KISS) configurability and indirection to code composed out of sub-units.

Because a testable unit of code must have its inputs and collaborators controlled, all the inputs and collaborators need to be configurable or replaceable, even when such configuration is unnecessary to the business value aimed at.

In statically typed languages like Java, this tends to exhibit as a proliferation of interfaces that only have a single implementation, namespaces with too many identifiers publicly exposed, and lots of open extension points - which hurts versioning. It tends towards requiring complex IoC controllers with associated config. Code ends up filled with boilerplate glue and over-abstraction (factory-factories etc.), and much harder to read because IDEs can no longer follow the link between a method call and its implementation - because the method call is all too often dynamically resolved via an interface implementation.




> "Testability" tends to add unnecessary (by KISS) configurability and indirection to code composed out of sub-units.

You mean "White Box Testability". Don't forget Black Box testing is agnostic to the implementation.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: