4 ms·
> Your tests are probing your code on a narrow range of inputs drawn from the valid state space that is almost always too large to actually verify. You don't n
by lugg 7y ago
> Your tests are probing your code on a narrow range of inputs drawn from the valid state space that is almost always too large to actually verify.
You don't need to verify all inputs with mathematical certainty. You're writing the code some reasonable shortcuts can be made, some basic understanding of what bugs happen and what kinds of tests provide the best ROI gets you > 80% of the way there.
> They're also themselves pieces of code that itself can have bugs.
No, they are tests, bugs in test code are incredibly hard to produce if you are practicing test first development.
Most real bugs that make it into production are from conditional flows that are not being covered by tests.
> I think people who say stuff like this are probably a little in denial about how many bugs they've actually written
No denial, I know I've written a bug before.
> and how difficult it is to get any kind of certainty about the correctness of their code
Nope, not in denial about this either, I find it relatively easy. Maybe I just don't do a lot of rocket science or something.
> Programmers write bugs, why are we policing the tools they use to fix them?
Nobody is policing tool usage here..
- mikeschinkel 7y ago> Nobody is policing tool usage here.. > I would be very concerned to see a developer using the debugger on a daily basis especially if they're using it for state validation. Those two statements seem to be in conflict. Or maybe I should say that latter is not "policing" so much as "patronizing" in a condescending manner.