3 ms·
You've repeated AP's failing this isn't a workflow nor a replacement replacement debugging concept. It is a design paradigm that lessens the need for heavy weig
by lugg 7y ago
You've repeated AP's failing this isn't a workflow nor a replacement replacement debugging concept. It is a design paradigm that lessens the need for heavy weight debugging.
Debugging still has its usecases. I, like others, just see it as an infrequently required tool when most systems when properly composed simply lack the complexity required to make them useful.
> It's not about a "need to step through because your code is too complex", more about validating the code you just wrote, whether it still "feels right" after it has been dumped from your mental model into actual code.
Debuggers are for debugging. Not development.
It's not a rule without excception but in the general sense 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.
Like what are you validating that your tests aren't? Why aren't your tests validating it?
The need for a debugger is a symptom of a sick system. I have never required a debugger on a healthy system.
I've used them on healthy systems for more complex problem sets but by and large I only reach for them when someone has done something appalling.
- deleted 7y ago[deleted]
- 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.
- ubadair 7y ago> Like what are you validating that your tests aren't? Why aren't your tests validating it? I use use a debugger fairly regularly when I'm writing tests. Debuggers are for moments of incredulity. When a test doesn't behave as I expect, I go back and look at my code. I'll look back and forth, and if I still don't see the root cause, then I'll fire go up gdb instead of adding print statements. Debugging a unit test is often way faster than recompiling.