News for hackers. Stuff that matters.
Re:The unreasonable effectiveness of print debugging by marco_craveiro on Saturday April 24, 2021 @12:29PM (#26926133)
I disagree slightly with the emphasis on "print debugging". I think what is missing is a body of theory around logging as a methodology. When I write code, I like to be able to look at the log file and "see" what the code is doing, when on DEBUG or higher. I think logging is a difficult but very important skill, and one which we are losing over time. If anyone is aware of any good books on logging (even if very old), do let me know. Seems like "logging theory" is a missing subject in Software Engineering.

I also don't see any contradiction between liking good logs and using the debugger when needed.

Re:The unreasonable effectiveness of print debugging by strikhedonia_ on Saturday April 24, 2021 @01:13PM (#26926534)
Absolutely.

When people say they use 'print statements,' are they talking about log points (a debugger construct), logging or something else?

I should hope that, in most cases, they're not literally modifying their source code to achieve this. While there are a handful of scenarios in which this is necessary, on the whole it strikes me as inefficient, time-consuming and error-prone. In most environments, there are better ways to make this data observable.