3 ms·
> Like what are you validating that your tests aren't? Why aren't your tests validating it? Your tests are probing your code on a narrow range of inputs (or if
by almostdeadguy 7y ago
> Like what are you validating that your tests aren't? Why aren't your tests validating it?
Your tests are probing your code on a narrow range of inputs (or if you're using something like property testing, potentially a larger but still finite range) drawn from the valid state space that is almost always too large to actually verify. They're also themselves pieces of code that itself can have bugs. Formal methods can prove properties about code, but usually w/ a much larger investment of time.
> The need for a debugger is a symptom of a sick system. I have never required a debugger on a healthy system.
I think people who say stuff like this are probably a little in denial about how many bugs they've actually written and how difficult it is to get any kind of certainty about the correctness of their code. Programmers write bugs, why are we policing the tools they use to fix them?
- 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.