Re: Coding Standards



Karl Uppiano wrote:
-- except for JavaDocs, which I write copiously. It gives me a nice place to describe the class, member variable, or method, with the input parameters, return values and exceptions thrown, in a way that is far more structured than you would get with ad-hoc comments.

Matthias Buelow wrote:
Which are exactly the kind of useless comments that clatter source code.
I thought the code should be expressive enough without all that chatter?
Documenting trivial details is nonsense. You should explain the big
picture in comments and why you did some details the way you did them,
and not verbosely reformulate parts of the source code.

While I agree with Matthias's points about commenting the more obscure parts of one's code, I cannot believe that he seriously is against the use of Javadocs. Javadocs are critical in Java source. They serve double duty - not only do they help future users of a class to use it correctly, they cover most of the non-trivial comments one would make about a class or method (or other exposed member). It's hardly "chatter".

--
Lew
.



Relevant Pages

  • Re: Coding Standards
    ... Which are exactly the kind of useless comments that clatter source code. ... I thought the code should be expressive enough without all that chatter? ... I explan the big picture in the JavaDocs. ... I have been writing software ...
    (comp.lang.java.programmer)
  • Re: detecting nasty class/jar files - statically ?
    ... [checking for platform-methods that can throw SecurityException] ... Note that you'll need Sun's source code, ... actually I could just as well check the html javadocs ...
    (comp.lang.java.programmer)
  • Where can I download Servlet 2.4 source code?
    ... does anyone of you know where can I find the source code of the ... servlet 2.4 specification? ... I downloaded some J2EE Bundles, ... are only javadocs. ...
    (comp.lang.java.programmer)
  • Re: Where can I download Servlet 2.4 source code?
    ... servlet 2.4 specification? ... I downloaded some J2EE Bundles, ... are only javadocs. ... It does not have source code. ...
    (comp.lang.java.programmer)