|
|
|
|
|
by talmand
4932 days ago
|
|
Wouldn't that function name have to be more like setTemperatureTo350ToCookPerfectly400WillBurn300WillMush to match what the comment is saying? What if later it is determined that the proper temperature should instead be 375 because at 350 they aren't quite cooked enough? |
|
People have a tendency to believe what the comment says, even when the code says something completely different.
It's easy to say that you would update both the comment and the value at the same time. But I've seen mismatched comments in code all the time for even a contrived example like this. And then what do you believe? Is the comment right with an incorrect implementation, or is the implementation right with an incorrect comment?