Slashdot Mirror


How to Write Comments

Denis Krukovsky writes "Should I write comments? What is a good comment? Is it possible to comment a class in 5 minutes? See " Everybody knows that good code is self documenting- which is why my prof in college demanded we write in Ada. I instead suggest commenting in haiku.

2 of 556 comments (clear)

  1. Re:Comments by bogado · · Score: 0, Redundant

    And, by closing his comment, you ruined his attempt to mark all of the comments bellow his as his own. :-)

    1) start a coment.
    2) write stating that this is your comment.
    3) don't close the comment, so that your comment is unbounded.
    4) claim copyrigth of your comment.
    5) ???
    6) profit!!!

    --
    []'s Victor Bogado da Silva Lins

    ^[:wq

  2. Re:Haiku Commenting? by zootm · · Score: 1, Redundant

    That's the point — inline comments tend to be bad at this ("thingy.Add(whatever); // add whatever to thingy" aids noone and damages the maintainability of the code), but it's important to write down why you are doing something, and what, on a large scale, you are trying to do.