Re: [Idea] Coding Guidelines for Maven Contribution Newbies

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: [Idea] Coding Guidelines for Maven Contribution Newbies

Elliotte Rusty Harold
On Sun, Dec 27, 2020 at 10:24 AM Benjamin Marwell <[hidden email]> wrote:

> Hi Sandra,
> hi everyone,
> here’s another subtopic:
> I recently added a comment like this: // [issue-##]: Do call method x
> because of side effect x
> But I got a review "the comment is redundant because of the git log".
> Is there a policy on where and how to put comments in the code?

There is no such policy.

As a matter of good programming, IMHO if code requires an explanation
and cannot be clarified to the point where it's self-evident, then
comments are useful. A Git comment is **not** a substitute for an
inline comment. Issue numbers are sometimes useful for problems that
are too complex to be fully elaborated in a few lines of comments,
whether in git or Java.

Whether this particular code needed a comment I don't know.

Elliotte Rusty Harold
[hidden email]

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]