3 ms·
Uncle Bob makes some interesting points about software testing and scientific methodology. His main point is that science is mostly not about proving things cor
by jillesvangurp 6y ago
Uncle Bob makes some interesting points about software testing and scientific methodology. His main point is that science is mostly not about proving things correct but about attempting to find ways to falsify an hypothesis by doing experiments. Failing to do falsify means the hypothesis is more likely to be true at some level. It could still be wrong or imperfect and theories are often refined or replaced by new theories. Science is about trying to find ways to prove things wrong and occasionally failing to do that in interesting ways. The more you fail at that, the better a theory becomes. If you succeed (by failing), you refine your theory and run more experiments.
Software testing is exactly the same. The more tests you have, the more evidence you build up that the theory that the software is incorrect in some way may be wrong. If you find out about a new way it could still be wrong, you write a test to prove that wrong. And then if you are right about that, you fix the software.
- raverbashing 6y agoUncle Bob is insufferable and thinks that anything less than 100% testing and your code doesn't work. > The more tests you have, the more evidence you build up that the theory that the software is incorrect in some way may be wrong. Or you could actually use the software. You can have 100% unit tests passing and a completely broken integration. He's not exactly wrong in that analogy but I think that in practice such utopia does not exist.
- jillesvangurp 6y agoI'm not advocating TDD either. But he has a point that testing (manual or automated), or even just using the software is a form of experimentation and thus a perfectly valid and scientific way of assessing whether software works or not.