![]() As I and many others have stated, comments are often necessary, but try to keep them to a minimum. But commenting too little (or not at all) is just as bad as commenting too much. (For a good list of excuses reasons, see Why programmers don’t comment their code. While it’s true that humans need to be able to comment code, it is not absolutely necessary that the language directly support commenting: for most languages, it would be trivial to write a script that deletes one line comments (for example, all lines beginning with ‘#’ or some other character) then runs the compiler. ![]() If you aren’t confused by what a piece of code is doing, but rather why it’s doing it at that moment, then a comment should be added. A handy rule of thumb is: a comment should only be added to answer a question that the code can’t.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |