3 ms·
There's nothing wrong about "debugging with print statements". If anything, if you're any good at it, it shows better knowledge of your program's behavior than
by coldtea 11y ago
There's nothing wrong about "debugging with print statements".
If anything, if you're any good at it, it shows better knowledge of your program's behavior than blindly looking around in the stack on a debugger.
In fact some of the biggest name programmers use just that -- including the very people who created .
At best it's "hardcore" -- but not "bad" or anything like what's in the list. Here's some appeal to coding authority for ya:
"The most effective debugging tool is still careful thought, coupled with judiciously placed print statements."
Brian Kernigham
"I don't like debuggers. Never have, probably never will." — Linus Torvalds
- JoshTriplett 11y ago> There's nothing wrong about "debugging with print statements". Nor is there anything wrong with searching for the text of an error message, but both are funny to see as a fake book cover.
- jschwartzi 11y agoIt's such a simple tool that it feels wrong the first time you do it.
- tdsamardzhiev 11y agoYet it's also the only thing that actually works in a tough debugging situation.
- interfixus 11y agoThank you so much. I shall give my guilt complex its first day off for twenty years.
- adamson 11y agoIf you want to justify it even more, you can think of it as testing invariants at various points in your program flow!