• souperk@reddthat.com
    link
    fedilink
    arrow-up
    65
    arrow-down
    1
    ·
    5 months ago

    I am definitely guilt for that, but I find this approach really productive. We use small bug fixes as an opportunity to improve the code quality. Bigger PRs often introduce new features and take a lot of time, you know the other person is tired and needs to move on, so we focus on the bigger picture, requesting changes only if there is a bug or an important structural issue.

    • NocturnalMorning@lemmy.world
      link
      fedilink
      arrow-up
      29
      ·
      5 months ago

      I always try to review the code anyway. There’s no guarantee that what they wrote is doing what you want it to do. Sometimes I find the person was told to do something and didn’t realize it actually needs to do Y and not just X, or visa versa.

      • ScampiLover@lemmy.world
        link
        fedilink
        arrow-up
        13
        ·
        5 months ago

        I like to shoot for the middle ground: skim for key functions and check those, run code locally to see if it does roughly what I think it should do and if it does merge it into dev and see what breaks.

        Small PRs get nitpicked to death since they’re almost certainly around more important code

    • breakingcups@lemmy.world
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      5 months ago

      So you’re always behind, patching up small bits of code that don’t comply with your guidelines, while letting big changes with, by deduction, worse code quality through?

  • jubilationtcornpone@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    24
    ·
    5 months ago

    Reviewing large PR’s is hard. Breaking apart large PR’s that are all related changes into smaller PR’s is also hard.

    If I submit a big one, I usually leave notes in the description explaining where the “core” changes are and what they are trying to accomplish. The goal being to give the reviewers a good starting point.

    I also like to unit test the shit out of my code which helps a lot. The main issue there is getting management to embrace unit tests. Unit tests often double the effort up front but save tons of time in the long run. We’re going to spend the time one way or the other. Better to do it up front when it’s “cheaper” because charging it to the tech debt credit card racks up lots of expensive interest.

    • pageflight@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      ·
      5 months ago

      Yeah, if you don’t want the next dev (or your future self) to accidentally undo that corner case you fixed, better put a unit test on it.

  • jack
    link
    fedilink
    arrow-up
    12
    ·
    5 months ago

    Ask him to do 500 lines and he will never look at it, making you wait forever

    • Honytawk@lemmy.zip
      link
      fedilink
      arrow-up
      15
      arrow-down
      1
      ·
      5 months ago

      Meanwhile, ask a c-suite to do 500 lines, and they party until they overdose.

    • jol@discuss.tchncs.de
      link
      fedilink
      arrow-up
      2
      ·
      5 months ago

      I know this is a joke, but it you did that I would reject the pr with the reason of too many things at once. Reopen separate PR to refactor variable names. I actually constaly get people doing this and it’s dangerous exactly for the reason you’re joking about. Makes it easier for errors to slip in.

  • brrt@sh.itjust.works
    link
    fedilink
    arrow-up
    9
    ·
    5 months ago

    Just give them 10 lines at a time from the 500 lines one. Is this how micromanagement was born?

  • TheSlad@sh.itjust.works
    link
    fedilink
    arrow-up
    5
    ·
    5 months ago

    In my first programming job, I would actually do code reviews by pausing my own work, pulling their branch and building it locally, then using debug mode to step through every changed or added line of code looking for bugs, unaccounted for edge cases, and code quality issues.

    …I dont do that anymore, I now go “looks good to me” even on 10 line reviews.