3 ms·
It feels like the author is making the opposite point when they distinguish between logging and print debugging. Logging being the permanent bits of code, that
by II2II 2y ago
It feels like the author is making the opposite point when they distinguish between logging and print debugging. Logging being the permanent bits of code, that either ship with the program or are disabled when the code is built for release. Print debugging are temporary bits of code that are manually added and removed as needed and is never intended to ship. If that is the distinction being made, then print debugging is problematic since the developer has to be diligent about removing it once it is not longer needed.
That said, I use print debugging all of the time. It is simply more practical in many cases.
- ggorlen 2y ago> print debugging is problematic since the developer has to be diligent about removing it once it is not longer needed. Linters make this a non-issue, and most modern development environments support them. https://eslint.org/docs/latest/rules/no-console https://eslint.org/docs/latest/rules/no-console https://docs.astral.sh/ruff/rules/print/ https://docs.astral.sh/ruff/rules/print/ In situations where for whatever reason it's infeasible to use a linter, a basic grep can surface prints in a codebase reliably enough.