25

One of our devs seems to love "attribution" comments in anything he writes.

private void foo() { //Author: John Cribbins

...public static final int FOO_BAR = 21; //Author: John Cribbins

I mean, I get it for an author tag at the top of a file, but certainly not on every field or method. Is this some kind of weird thing newer devs are encouraged to do these days?!

Comments
  • 16
    Maybe he doesn't know what git blame is?
  • 7
    There's an easy wax to prevent this. Peer reviewing of code. "Can you remove this comment? It's redundant, Git blame will show you as the author of these lines anyway."
  • 0
  • 5
    Better than:

    // Start John Cribbins Edit (2019-12-05) Jira # 7756487
    public static final int FOO_BAR = 21; // was 42
    // End John Cribbins Edit (2019-12-05) Jira # 7756487
  • 3
    To prevent this you can add a dangerFile to your CI process (look it up at https://danger.systems/js/ ) and add a rule that disallows merges that contain files including specific strings; such as this dude’s name 😈
  • 2
    This is not okay.

    Credits belong in humans.txt and in git commit metadata

    Not in source code.

    It is weird when the original author’s name appears in a file which has been completely refactored by someone else.
  • 1
    @jiraTicket you also have to remember that there are many developers older than source control as a concept.
  • 1
    Sounds like someone forgot they added the git lense extension
  • 0
    @jennytengsonM @jiraTicket @kescherRant

    We take these out in code review, every time, and tell him they're unnecessary. I mean, he doesn't argue, just goes "ok, I thought it might be helpful in this case because (blah)" and then removes them - so it's not a big problem, it's just... plain weird, IMHO.

    Fair point though, not sure I've specifically explained the concept of git blame. That's on me, shouldn't assume that knowledge.
Add Comment