Hey, I want your opinion on code reviews, what is the best way to use them in a professional environment? Pick one of the following and give me your thoughts (from the most forgiving to the most strict):

  1. no code reviews, they are useless
  2. optional code reviews
  3. mandatory reviews on code that is already merged, optional fixes
  4. mandatory reviews on code before merging (like a pull request), with a time-frame for optional fixes (i.e. whether to fix what has been pointed out is up to the author), merge will occur anyway.
  5. mandatory reviews on code before merging (PR) with mandatory fixes.

Of course in open source development with public contributions, you’ll often see (5), but I’m not convinced it could work in professional dev.

Edit: I’m talking about a team of 5 mid to senior devs (no junior or interns) working on a 2-3 year project without many security concerns, but feel free to give me your general opinion.

  • pinball_wizard@lemmy.zip
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    2 days ago

    Wow. I did’t expect my team to be at the more relaxed end of the responses!

    We have #5, but some (non-breaking) feedback can still be deferred to a future follow up issue.

    That said, my team rarely exercises the option to defer feedback.

    • TehPers@beehaw.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      2 days ago

      We have #5, but some (non-breaking) feedback can still be deferred to a future follow up issue.

      This is usually my preferred option, but usually i differentiate between blocking and non-blocking feedback in my reviews. Non-blocking is some improvement that can be made, but is not necessary, like cleaning up some (tangentially-related) code. Blocking is anything that is logically incorrect, unreadable, uses deprecated features unnecessarily, etc.