Hacker News new | ask | show | jobs
by shoo 3691 days ago
working on systems that don't have automated tests, and are designed such that adding automated tests is not easy.

you don't have to practice TDD, but it is a fantastic idea to add automated tests early on when the architecture of your system is still fresh and changeable.

projects that don't consider "testability" as a requirement tend to produce system architectures that are not testable.

1 comments

Projects that consider "testability" as a requirement tend to produce systems that are perfectly testable, but this is orthogonal to whether the architecture makes sense and can be composed with something else.
maybe so. i guess my comment is a reaction after seeing a few projects where it is an afterthought.

i assume by "orthogonal" you mean independent, i.e. just because a system is testable it does not mean it necessarily has other desirable properties.

Actually sometimes being easy to run tests on harms the code, because the code grows its surface just to plug in more tests, or the author stops at "I can test it, so it's good enough" instead of ensuring the architecture and/or interface is so simple that it can't ever possibly fail.