Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I realize that the "header comment" format varies from programmer to programmer, but what would be an example of a "good" header comment?

share|improve this question
    
Is this question about only formatting, or about style and content? –  Macneil Mar 30 '11 at 22:30
    
@Macneil Depends on what they mean. For now, I'll play safe and say "both". :) –  muntoo Mar 30 '11 at 22:33

1 Answer 1

up vote 1 down vote accepted

Regarding formatting style, consistency is most important to strive for. Make sure every class definition comment looks like every other one, every method comment looks like every other one, etc.

So, if you're modifying existing code, make sure you follow their formatting style. The comments (and, to an extent, code) should look like only one person has worked on the file. If you're starting a new project, pick one style format and stick with it.

Places to start looking:

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.