The Secret of High-Performing Developers
blog.daftcode.pl
The Secret of High-Performing Developers
1–10 of 14 posts
Re: The Secret of High-Performing Developers
#2Ok guy. Sure.
Re: The Secret of High-Performing Developers
#3Read article. Wishy-wash.
Re: The Secret of High-Performing Developers
#4For 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.
Re: The Secret of High-Performing Developers
#5> In general I would say: if you need to debug — you’ve already lost your way. Ok guy. Sure.
That's basically saying, "If you have to check to make sure your code totally works (including edge cases), you've lost your way".
The fact that he says using logs to determine the state of a program when debugging is an anti-pattern raises red flags for me as well.
Re: The Secret of High-Performing Developers
#6> In general I would say: if you need to debug — you’ve already lost your way. Ok guy. Sure.
Re: The Secret of High-Performing Developers
#7This whole article seems to be written to follow some blogging best practices rather than actually giving good advice based on actual experience.
Re: The Secret of High-Performing Developers
#8> In general I would say: if you need to debug — you’ve already lost your way. Ok guy. Sure.
Yea, like what? That's basically saying, "If you have to check to make sure your code totally works (including edge cases), you've lost your way". The fact that he says using logs to determine the state of a program when debugging is an anti-pattern raises red flags for me as well.
Sometimes log debugging is about the only thing you have to go with, depending on the language and tool set you are using.
Re: The Secret of High-Performing Developers
#9Logging and print debugging is definitely not an anti-pattern. In fact, it's often a great tactic to narrow down the issue in your codebase (called “binary debugging” by the author). This whole article seems to be written to follow some blogging best practices rather than actually giving good advice based on actual experience.
Using the debugger and variable watching much more has been the most productive change i've made in my workflow in the last 5 years.
In fact if you get good with a debugger, you don't need to log anything, as you can just view it's value at any point in the program. And with a good system in place you are seconds away from inspecting any single part of the program state at any moment, even being able to edit it while the program is paused to force the program to be in the state you want to debug.
Re: The Secret of High-Performing Developers
#10Logging and print debugging is definitely not an anti-pattern. In fact, it's often a great tactic to narrow down the issue in your codebase (called “binary debugging” by the author). This whole article seems to be written to follow some blogging best practices rather than actually giving good advice based on actual experience.
I'm suprised "Using debugger for daily coding" is an anti-pattern. Using the debugger and variable watching much more has been the most productive change i've made in my workflow in the last 5 years. In fact if you get good with a debugger, you don't need to log anything, as you can just view it's value at any point in the program. And with a good system in place you are seconds away from inspecting any single part o…
The usual argument against using a debugger is that, arguably, you should already have a reasonably accurate mental model of your program. Therefore, you should not need a debugger, just a printf here and there to confirm your mental model is correct.
However, when you don't quite understand how the program works, especially when you think you do but really don't, a debugger is invaluable. It's useful like printfs, only exponentially more so. You can learn so much of your tech stack with a debugger it's not even funny how few people ever bother with them.