Slashdot Mirror


User: Symbiot

Symbiot's activity in the archive.

Stories
0
Comments
29
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 29

  1. Re:OO is slow, why would they want to COUNT on JAV on OpenOffice 2.0 Criticized on Use of Java · · Score: 1
    Explain why I am going to use this when the current release does not require Java?

    Because it will be more reliable and quite possibly faster under Java? From a utilitarian perspective the use of Java is a benefit, not a drawback.

  2. Re:Joel on Software on Comments are More Important than Code · · Score: 1

    It's harder to read code than to write it. That depends entirely on the code itself. Well written code is much easier to read than to write. The real reason that people rewrite other people's code is that it's much more gratifying to write code than it is to read it

  3. Comments don't execute on Comments are More Important than Code · · Score: 2, Interesting
    Comments exist to add value to code. Saying that comments are more important than code is like saying that cooking is more important than food.

    To paraphrase Einstein: we should write as few comments as possible, but no fewer. The reason is that comments don't execute and therefore aren't constrained to tell the truth about the code. So anything about the code that can be said directly in the code ought to be because that makes what's been said inseparable from what actually happens when the program runs. If it can't be said in the code then it ought to be said in the tests. Tests don't force the code to conform to the properties that they describe but the do tell you if it doesn't. They are one step removed but still provable. The redundancy of saying the same thing in both the code and the tests is valuable because the difference in perspective forces a greater degree of precision and, therefore, a higher chance of correctness.

    Saying the same thing again in comments is not useful from the perspective of correctness, so the value of redundancy in comments is limited to the value of redundancy in most communication: if it's done sparingly it adds emphasis, otherwise it's just a harmful distraction. The value of comments is that they can be used to say all of the things that couldn't be said in the code or in the tests. The best code expresses the vast majority of its important information in the code and the tests, but is not stingy about expressing all the rest of its important information in comments. Comments written in this way augment the code without distracting from it.

    Remember:

    The code is the truth
    The tests expose the truth
    The comments embellish the truth
  4. Comments don't execute on Comments are More Important than Code · · Score: 1
    Comments exist to add value to code. Saying that comments are more important than code is like saying that cooking is more important than food.

    To paraphrase Einstein: we should write as few comments as possible, but no fewer. The reason is that comments don't execute and therefore aren't constrained to tell the truth about the code. So anything about the code that can be said directly in the code ought to be because that makes what's been said inseparable from what actually happens when the program runs. If it can't be said in the code then it ought to be said in the tests. Tests don't force the code to conform to the properties that they describe but the do tell you if it doesn't. They are one step removed but still provable. The redundancy of saying the same thing in both the code and the tests is valuable because the difference in perspective forces a greater degree of precision and, therefore, a higher chance of correctness.

    Saying the same thing again in comments is not useful from the perspective of correctness, so the value of redundancy in comments is limited to the value of redundancy in most communication: if it's done sparingly it adds emphasis, otherwise it's just a harmful distraction. The value of comments is that they can be used to say all of the things that couldn't be said in the code or in the tests. The best code expresses the vast majority of its important information in the code and the tests, but is not stingy about expressing all the rest of its important information in comments. Comments written in this way augment the code without distracting from it.

    Remember:

    The code is the truth

    The tests expose the truth

    The comments embellish the truth