Questions tagged [comment-conventions]
7 questions
1121
votes
12 answers
How to "comment-out" (add comment) in a batch/cmd?
I have a batch file that runs several python scripts that do table modifications.
I want to have users comment out the 1-2 python scripts that they don't want to run, rather than removing them from the batch file (so the next user knows these…

user1397044
- 11,679
- 6
- 19
- 16
7
votes
2 answers
What's a good way to make a type a plural when writing comments?
When writing comments, I sometimes find myself needing to talk about a type (class, struct, etc.) in plural when writing comments, such as:
/*
* getThings
* Get a list of --> Things <-- from somewhere.
*/
Thing *getThings(void);
The problem…

Joey Adams
- 41,996
- 18
- 86
- 115
1
vote
4 answers
What is the preferred way of notating methods in comments?
Sometimes one has to refer to another method when commenting. Here some example in PHP:
class A
{
/**
* @see B::bar
*/
public function foo()
{
B::bar();
}
}
class B
{
public static function bar()
{
…

Philippe Gerber
- 17,457
- 6
- 45
- 40
1
vote
2 answers
HTML comment conventions
I need to use HTML comments to store specific data, but I don't want use comment schemes that already exist, as generated by programs like Dreamweaver or Frontpage.
How do I know what comment scheme would be…

Robin Rodricks
- 110,798
- 141
- 398
- 607
1
vote
3 answers
Conventions for commenting/documenting .sql files
How do you guys comment/document your .sql files?
Are there conventions similar to those of javadoc and the likes?
What is commonly done in large scale database-heavy applications like facebook, twitter, google....

DudeOnRock
- 3,685
- 3
- 27
- 58
1
vote
2 answers
What are some "zen" moments of code commenting that you have created or reviewed?
I am looking for examples of reasonably short, but reasonably complicated segments of code (objects, functions, classes, a particular set of variable names, etc) that strike that perfect zen like balance of self documentation and implementation…

Gordon Potter
- 5,802
- 9
- 42
- 60
0
votes
1 answer
What are some good Code Formats?
Firstly, I am aware of this question:
Are there standard formats for comments within code?
But it didn't answer mine. Whenever I write code, I always try to form a habit of ensuring that the comments are all consistent, but that is where I am…

Aram Kocharyan
- 20,165
- 11
- 81
- 96