Top "Comments" questions

A comment is a programming language construct used to embed non-compiled, programmer-readable annotations in the source code of a computer program.

Why is executing Java code in comments with certain Unicode characters allowed?

The following code produces the output "Hello World!" (no really, try it). public static void main(String... args) { // The comment …

java unicode comments
Best practice for C++ function commenting

Is there an accepted best practice for commenting functions? I only know of the doxygen style but it is not …

c++ coding-style comments
How do I comment in CoffeeScript? "/* this */" doesn't work

In what ways can you comment in CoffeeScript? The documentation say you can use three hash symbols to start and …

coffeescript code-formatting comments block-comments
Details of difference between @see and @inheritDoc

I have looked over JavaDoc reference, and while I understand basic difference between @see (various links) and {@inheritDoc} (export of …

java javadoc comments
Comment Inheritance for C# (actually any language)

Suppose I have this interface public interface IFoo { ///<summary> /// Foo method ///</summary> void Foo(); ///<summary&…

c# inheritance comments
How to put a line comment for a multi-line command

I know how to write a multi-line command in a Bash script, but how can I add a comment for …

bash shell comments
Simple Getter/Setter comments

What convention do you use to comment getters and setters? This is something I've wondered for quite some time, for …

java comments javadoc setter getter
Razor comment syntax

What is the syntax for server side comment in razor view? I want to comment this code: /* @helper NavItem() { } */

asp.net-mvc-3 razor comments
What is self-documenting code and can it replace well documented code?

I have a colleague who insists that his code doesn't need comments, it's "self documenting." I've reviewed his code, and …

documentation comments
Block commenting in Ruby

Does Ruby have block comments? If not, is there an efficient way of inserting # in front of a block of …

ruby keyboard-shortcuts comments text-editor