• dan@upvote.au
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    2 days ago

    AI loves inserting comments like this.

    Either that or 20-line comments documenting the bugs in the old code, what this code does differently, and the exact implementation.

    Comments describing the exact implementation become stale very quickly. Comments shouldn’t explain what the code does (eg “add two to rowCount”); they should explain why it does it (eg “include header and footer row in count too”). Extra details are what the commit message is for, and history is what source control is for.

    I call it out in a lot of my code reviews (“code looks good but clean up the AI slop comments before landing”) but a lot of other developers don’t care as much about code and documentation quality.

    • partofthevoice@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      20 hours ago

      It really pisses me off when the fucking thing starts referring to the patched code as “updated” in the README, comments, function names… Stupid bot needs to be told not to implicitly refer to prior versions of the code, always regarding current state as initial release. Why the shit do I even need to say that?