3 ms·
Some of these seem like attacking straw men of people using techniques that aren't as dangerous as others. For example: Logging and print debugging — let
by taeric 9y ago
Some of these seem like attacking straw men of people using techniques that aren't as dangerous as others.
For example:
Logging and print debugging — let print what is
the state of code at the different points of
execution and see what it is.
I certainly agree that a code base with a billion logging statements can be a bad thing. In large because it is worth less and less at more and more scale.
That said, I think it is quite common to make a few quick hypothesis about the code and confirm them with a few log statements.
Similarly, having an execution framework in your head can help if you are looking at something. So,
Random debugging — trying different approaches
within the context of application. Maybe the
problem is in this line? No? Maybe that line?
OK, maybe let’s try this line?
Sure, that is bad if you make it a heavy weight process. But if you have a good mental model of the code, you can quickly simulating what would happen if assumptions and intentions of various lines go wrong.
That said, the general message seems to be that those that play with things will be better at it. This seems a safe assumption. I'd love to see a good data set exploring these thoughts.