3 ms·
I firmly believe that there will always be a horizon effect whereby there will be a solution that matches all of the tests but fails for the general case. Comp
by emaginniss 4y ago
I firmly believe that there will always be a horizon effect whereby there will be a solution that matches all of the tests but fails for the general case. Computers are more likely to find that test-solving solution that doesn't handle the general case because of their iterative nature, whereas humans want to solve the general case first and then add in conditions to handle the unexpected cases.
- falcor84 4y agoAs I understand it, the proponents of TDD would argue that as long as the implementation tends towards laziness (avoiding unnecessary complexity), adding more and more tests to handle additional edge cases should cause the code to converse to solving the general case (and avoid local minima). I suppose that the crucial piece is the laziness, including refactoring whenever possible, to save time on addressing each subsequent test case.