On Sun, Dec 27, 2020 at 10:24 AM Benjamin Marwell <[email protected]> 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
[email protected]

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

Reply via email to