4 ms·
> In general I would say: if you need to debug — you’ve already lost your way. Ok guy. Sure.
by efficax 9y ago
> In general I would say: if you need to debug — you’ve already lost your way.
Ok guy. Sure.
- John23832 9y agoYea, like what? That's basically saying, "If you have to check to make sure your code totally works (including edge cases), you've lost your way". The fact that he says using logs to determine the state of a program when debugging is an anti-pattern raises red flags for me as well.
- holtalanm 9y agoI'm glad I'm not the only one that read that and was like ...'wait, what?' Sometimes log debugging is about the only thing you have to go with, depending on the language and tool set you are using.
- taeric 9y agoI think this is more specific than that. Specifically, I think the idea is if you are using a remote debugger and stepping through lines of your program. I'm torn. Supposedly this is the magic of the old lisp machines. At the same time, since moving to microservice land, I have found I have not used a stepping debugger in a long time.
- mspradley 9y agoI agree. He lost all credibility with that statement.
- burntrelish1273 9y ago"It depends" is the only valid truism. There's no panacea for techniques, tools or philosophy. Fast-running TDD unit and smoke tests are great for non-fragile, fast development, however throwing a "pry" or equivalent breakpoint in some code not behaving as expected can be immensely helpful. Heck, when I started out 25 years ago, trial-and-error in an IDE is how I learned how Turbo Pascal worked. REPLs and IDEs are great for digging into how a piece of code works live, while automated testing is to assure things aren't broken and code isn't treated as a sacred text.