by efficax · 9y ago · 0 comments
Ok guy. Sure.
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.
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.
Sometimes log debugging is about the only thing you have to go with, depending on the language and tool set you are using.
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.