Printf Debugging and Srinivasa Ramanujan
earthly.dev
earthly.dev
Brian Kernighan, “Unix for Beginners”
Finally someone has the courage to tell the truth.
s/debugging/testing/g and watch much of the current hype over TDD/CICD evaporate before your very eyes.
When you are familiar or at lease somewhat familiar with a code base printf + careful thought is King. It also has the added benefit of forcing your to think through related edge cases you are missing or will miss if you fix the bug in a certain way.
But when you are working on a massive codebase with significant state being maintained, a debugger will go a looong way.
Besides, you've got to have decent logs to be able to debug issues that happened in production.
Printf, logging, debuggers, repls, they are all tools in the toolbelt that you use when it is appropriate. And don't use when it isn't appropriate.
Reading and Thinking through a program (i.e. playing Computer) is a mandatory skill for all Programmers. Yes it is time-consuming, tedious and maybe not always Optimal, but there really is no other way. All Debuggers/IDEs/Analysis tools are an adjunct to actual Thinking through the code since the use of any of the above presupposes some understanding of the code.