3 ms·
> accidental Besides a debugger, isn't one of the first things people do (even undergrads) is start logging out variables that may be suspect in the issue? If
by Freedom2 2y ago
> accidental
Besides a debugger, isn't one of the first things people do (even undergrads) is start logging out variables that may be suspect in the issue? If you have potentially a problematic computation, put it in a variable and log it out - track it and put metrics against it, if necessary. I'm not entirely sure a full article is worth it here.
- djmips 2y agoYou missed the point of the article.
- Terr_ 2y agoWhat is it that you believe they missed? People have writing code in a certain way to provide logical "breadcrumbs" for a very long time, and doing it very deliberately. The fact that a tool was created that takes advantage of that isn't an "accident." Compare to: "Correctly-spelled words as accidental hyperlinks to the dictionary definition."
- djmips 2y agoThey missed that many programmers sometimes especially experienced ones like to write code that's very clever and packs a lot into one line of code to the detriment of debugging, often by others who may just be trying to reverse engineer what someone who left wrote.
- vanschelven 2y ago> If you have potentially a problematic computation, put it in a variable and log it out My point was: what a "potentially problematic" computation is is not always known in advance. A style which is rich in local variables, when combined with a tool that shows actual values for all local variables when unhandled exceptions occur gives you this "for free". I.e. no need to log anything.