3 ms·
His point, as phrased, is correct though, something that is hard to test is badly designed. You need to be able to test your software in some way or another. E
by ktRolster 11y ago
His point, as phrased, is correct though, something that is hard to test is badly designed. You need to be able to test your software in some way or another. Even if you've proven its correctness, you still want to put it through some basic sanity tests (as Donald Knuth pointed out).
- sago 11y agoYes, but it misses the point of the criticism. The issue isn't whether the final product is difficult to test. It should be roughly as easy to test the final product no matter the implementation strategy. The problem is that TDD requires a royal-road of testing. No code can be written without tests for that specific piece of code. So you can only build the whole out of components that are testable in isolation. The claim is that this excludes architectures that don't provide such a step-by-step path of testing. This interacts badly with the 'make everything an API' idea. You end up with these functionally small units with over-engineered APIs rather than something more complex, more efficient, and easier to refactor as a whole.