![]() ![]() ![]() Rule 1: Comments should not duplicate the code The rest of this article explains each of these rules, providing examples and explaining how and when to apply them. ![]() Rule 9: Use comments to mark incomplete implementations. Rule 7: Include links to external references where they will be most helpful. Rule 6: Provide links to the original source of copied code. Rule 5: Explain unidiomatic code in comments. Rule 4: Comments should dispel confusion, not cause it. Rule 3: If you can’t write a clear comment, there may be a problem with the code. Rule 2: Good comments do not excuse unclear code. Rule 1: Comments should not duplicate the code. Here are some rules to help you achieve a happy medium: While all of these points are true, it would be a mistake to go to the other extreme and never write comments. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |