comment-conventions

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 <!-- #BeginLibraryItem "/File.lbi" --> or Frontpage. How do I know what comment scheme would be least problematic, or at least not look like other existing comment conventions? PS: I'm ...

What is the preferred way of notating methods in comments?

Hey! 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() { // ... } } So what if there would be a non-static method bar in class B? What...

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 elegance. It could either be something you are really proud of or something that you came ac...

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 is, the type name is singular (namely, Thing), but I want to talk about them in plural in...