3 ms·
If the author really meant "do not ever run this script", he should have deleted it. Instead, he added a comment. When comments disagree with code, code wins. R
by gruseom 19y ago
If the author really meant "do not ever run this script", he should have deleted it. Instead, he added a comment. When comments disagree with code, code wins. Rather than taking responsibility and learning this, he blames the stupidity of a newbie.
- almost 19y agoIt's useful to have those scripts around, you might want to do another installation somewhere or it might just be useful to see how the tables are meant to be if they get screwed up.
- gruseom 19y agoWell, sure. But then he didn't really mean what the comment said, which was "DO NOT EVER RUN THIS SCRIPT". There are any number of strategies he could have used to prevent what happened. The one he chose was to add an inaccurate comment to code and assume that every subsequent programmer would read it, understand its meaning, and do what it said. That's not just one fundamental mistake but several.
- eru 19y agoNo. It was not just comments. Did you read the line that says 'exit 1'?
- gruseom 19y agoFair enough. He also disabled run permissions on the script. But my point isn't really about "just comments", it's that good programmers take responsibility for failures that arise from their work. In this case, printing "DO NOT EVER RUN THIS SCRIPT" and exiting without doing anything led to misunderstanding and problems in the hands of a curious and inexperienced successor. Here the author had a choice to make. He could look at how his rather hokey strategy contributed to the failure or he could hype up the stupidity of the other guy.
- eru 19y agoGuess what's funnier? The back-ups were his saving grace.
- chaostheory 19y agoI agree with grusome I don't know who's the bigger idiot the new guy or the author... and when I think about it I think it's the author. I can understand having a script that recreates the tables from scratch, but why include the drop table line?