Because it's unreliable.
Imagine someone shooting a BB gun blindfolded. He keeps hitting you in the butt and it's darn uncomfortable. So you move ten inches to the right. The BB's continue whizzing past you, "thwap, thwap, thwap..." Then the shooter scratches an itch and resumes shooting, but this time he hits you again. Or you lean to the side to pick something up... you get hit again. Or someone walks up to talk to you, and he gets hit. Just because you're not currently getting hit doesn't mean the BB's aren't hitting anything anymore. You're just not the one getting hit.
Adding the print statement might stop you from getting bit by the bug, but it doesn't mean the bug isn't biting anymore. Some minor change elsewhere in the code could cause the stars to align again and you start getting bit again.
Just a thought....
| [reply] |
The point is that if the print statement truly fixed the problem, then it would be fixed. By definition.
We both know that is unlikely. The reality is (most likely) that the addition of a print statement defers the symptom. And that realisation of itself is a useful one.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
Because building secret magic into your program is sloppy, and could easily bite him in the rear in time.
Quick example: he adds the print statement. Someone inherits the code. They do some clean-up, kill the print statement. Boom, code segfaults for no apparent reason.
It's just a bad idea to paper over potentially (and in this case, ACTUALLY) fatal, hard-to-trace errors instead of fixing them.
for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";
| [reply] [d/l] |
- Why does it have to be "secret"? This would be a perfect example of when to legitimately use that mercilessly overused construct: a source code comment.
- Calm your indignation and try to think laterally. What other purposee might my suggestion serve?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |
1. Comment not previously mentioned, or, I would think, safely assumed. Magic is secret until proven otherwise ;-)
2. In the future, please warn other monks that they're entering a socratic dialogue zone, wherein the reasonable assumption that people mean what they say isn't valid. Otherwise, you're basically baiting a rhetorical trap with flawed arguments, then declaiming as unsophisticated those who take them in the spirit that custom and logic suggests be the default reading.
Maybe just a line reading: "Socrates sez," or an ASCII graphic of Admiral Ackbar.
To make sure I'm being perfectly clear: I'm not (nor ever really was) indignant at you for either the first comment or this one; I just think that, intentionally or no, you're basically lecturing people for taking your statements in good faith, who have no reason to do otherwise.
for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";
| [reply] [d/l] |