‹ BackHN Continuity

Thread

There is more to code review than (automatable) detection

165 points · 117 comments · utiiiD

  1. dimbletimbers · · focus · HN ↗
    A defense of human code review I wish I saw more often, especially in light of the concerns people have about cognitive/comprehension debt: comprehension redundancy. At the end, if taken seriously, at least two people understand how the feature works (even if that number is, on average, trending closer to between one and zero). Ideally at least one of the two also comes away with a better understanding of the wider system and how the feature fits into or stands out from that landscape.
    1. atomicnumber3 · · focus · HN ↗
      If only one person knows the code, then PR time isn't going to save you.

      I'm tech lead and I basically don't review PRs, and I tell people this, with a caveat - if you can tell me what you specifically want me to review, for what specific purpose, I'm happy to!

      So "can you review this bit for race conditions" is great, love it. This forces people to actually think about what in their code they should be suspicious of, if anything.

      "Can you review this" [link to PR] is getting a rubber stamp because humans have never been good enough at "just spotting bugs" to make this worth it and now any LLM is better than a human.

      And for the purpose of understanding - PR time is too late. I have not reviewed a PR ("for real") in a long time and yet I could tell you how every system my people have built works down to a very fine level of detail. And it's because _we talk to each other!_ We don't just chill in the same slack channel and code independently, we all value each others brains and want each others inputs because we know it will improve our product and we value what perspectives others will bring.

      Trying to learn via PR is a sad substitute for real collaboration and teamwork.

      1. infinitebit · · focus · HN ↗
        THANK YOU. I’ve always felt this way about PR review. I feel like people should write a natural language description of the change, and every section of it should link to part of the diff, and every part of the diff should be linked to by part of the description. That or just leave a comment on every chunk of the diff.
        1. bunderbunder · · focus · HN ↗
          This sounds like a fussier version of what Donald Knuth was doing with literate programming.

          Which, incidentally, is a really enjoyable way to work.

        2. Hamuko · · focus · HN ↗
          People in my team are generating long and verbose PR descriptions with AI. No idea why and for whom. I certainly never read any of them.
          1. sfn42 · · focus · HN ↗
            Man I'm so sick of seeing 50-line PRs with 800 lines of AI slop markdown files included. I also don't read them.
        3. nottorp · · focus · HN ↗
          A proper natural language description of the change without links to parts of the diffs is already advanced material.

          And arguably if the description needs linking to parts of the diffs then the commit is too large?

        4. jolaflow · · focus · HN ↗
          You might have use for an issue tracker I've been building the past year and a half. It lets you inspect diffs inline in the ticket, and replay the board to see how the workflow evolved over time via a timeline scrubber.

          <a href="https:&#x2F;&#x2F;ljtn.github.io&#x2F;epiq&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ljtn.github.io&#x2F;epiq&#x2F;

          It stores issues as an immutable event log in your repo, so you can go back and inspect the context behind a change without having to litter the code with comments. Helps with traceability of intent.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.