Tagged Questions
54
votes
24answers
3k views
Is writing comments inside methods not a good practice?
A friend told me that writing comments inside methods is not good. He said that we should have comments only for the method definitions(javadocs) but not inside the method body. It seems he read in a ...
52
votes
17answers
3k views
Are first person comments distracting and unprofessional?
I just found myself writing the following comment in some (archaic Visual Basic 6.0) code I was writing:
If WindowState <> 1 Then
'The form's not minimized, so we can resize it safely
...
23
votes
20answers
2k views
Self Documenting Code Vs. Commented Code
I had a search but didn't find what I was looking for, please feel free to link me if this question has already being asked.
Earlier this month this post was made:
...
20
votes
8answers
1k views
Should comments say WHY the program is doing what it is doing? (opinion on a dictum by the inventor of Forth)
The often provocative Chuck Moore (inventor of the Forth language) gave the following advice (paraphrasing):
"Use comments sparingly. Programs are self-documenting, with a
modicum of help from ...
17
votes
10answers
1k views
Are chatty/humorous comments in source code acceptable or unprofessional? [duplicate]
Possible Duplicate:
Humor in Documentation
Throughout my professional career, I have often relied on chatty or humorous comments in source code (or source control commit messages) to help ...
16
votes
12answers
10k views
What does XXX mean in a comment?
What do people generally mean whenever you see XXX in a comment. Occasionally, I'll see a comment like this:
# XXX - This widget really should frobulate the whatsit
Of course, I can tell what the ...
16
votes
8answers
946 views
Are 'edited by' inline comments the norm in shops which use revision control?
The senior dev in our shop insists that whenever code is modified, the programmer responsible should add an inline comment stating what he did. These comments usually look like // YYYY-MM-DD <User ...
12
votes
4answers
534 views
Co-worker uses ridiculous commenting convention, how to cope? [closed]
A co-worker in the small start-up I work at writes (C++) code like this:
// some class
class SomeClass {
// c'tor
SomeClass();
// d'tor
~SomeClass();
// some function
void ...
1
vote
2answers
113 views
How to systematize tagging in code?
There are several almost standard tags used in comments: FIXME, TODO, BUGBUG.
Which other tags do you use and for what?
Are there any standards on using them, i.e. format (supplemening with date and ...