3 ms·
Yes. Verbs! Good things. (No explicit verbs in this paragraph, though.) In any case, the comment for a class or method (or whatever) should start with a quick,
by pjscott 14y ago
Yes. Verbs! Good things. (No explicit verbs in this paragraph, though.)
In any case, the comment for a class or method (or whatever) should start with a quick, concrete one-sentence description of what it is or does -- preferably starting with a verb, as you said. If you want to elaborate later, great, but everything needs the one-sentence summary. If I could tell inexperienced programmers one thing, this would be a strong contender. (Other possibilities include "Write your programs in discrete pieces that you can test in isolation, as much as possible," and "Make it work before you make it fancy.")