Your Code Review Sucks

Поделиться
HTML-код
  • Опубликовано: 5 апр 2024
  • Bad tooling results in bad code reviews
  • НаукаНаука

Комментарии • 25

  • @HYRULE10
    @HYRULE10 2 дня назад +5

    My team typically prefixes small comments like that (assuming they're not caught by a linter) with "nit: thing could be more descriptive" so that the reviewee knows that these are minor things. Then when there's a comment that doesn't have a nit, they know that's more important feedback to consider.

    • @nuttygold5952
      @nuttygold5952 День назад

      Same

    • @TheStruders
      @TheStruders 5 часов назад

      If a comment can be ignored or is optional, then it's a waste of time adding it. The whole point of the video is these "nit picks" should and can be automated away

    • @HYRULE10
      @HYRULE10 5 часов назад

      @@TheStruders a linter can't tell you that your variable isn't describing the right thing. saying green = yellow isn't something a linter is going to find.

    • @nuttygold5952
      @nuttygold5952 3 часа назад

      @@TheStruders a comment might be optional if, time does not allow or the implementor has a good reason not to do it.
      For example, lets say were moving in this new direction and any new code should be migrated, you as a senior might want to share that knowledge and inform the implementor but not enforce because maybe the refactor is just too big to do at that point.
      You tone implies you have a hard and fast rule, which is almost certainly wrong some of the times!

  • @someaccount-mp4tk
    @someaccount-mp4tk Час назад

    This guy right here == gold advice

  • @potaetoupotautoe7939
    @potaetoupotautoe7939 7 дней назад +2

    i have absolutely seen the same problem at my previous job.
    love your content. please upload more knowledge.

  • @Egzvorg
    @Egzvorg 5 дней назад +2

    Raymond Hettinger gave a talk "beyond PEP8" for Python. There is a great experiment he shows to demonstrate the distraction problem (you need to count basketballs on screen).

  • @dstn3422
    @dstn3422 10 дней назад +11

    Well, most developers will think about PR reviews as a chore. Everyone wants to code but not everyone wants to review other's code. So this might be a mentality problem too. I've left 12 (it was 12 btw :D) comments, I did my part.
    But also, I wouldn't say that the review given sucks in such case. Yes, you lost focus as a reviewer of what's important because you've been distracted by smaller issues, but I'd blame it on the person creating the PR. Even as a junior, are you really not able to follow naming conventions that are already established in the code base? I don't want to introduce a thousand linter rules for each case. I want people be able to follow established project styles.

    • @axisaligned9799
      @axisaligned9799 9 дней назад +2

      if your *many* tiny rules can't be introduced by a linter & formatter then you are just creating arbitrary rules that follow no pattern...

    • @dstn3422
      @dstn3422 7 дней назад +2

      @@axisaligned9799 Yes, definitely, we can go to either extreme. Having too many arbitrary rules is the other end of the spectrum.

  • @piotrlewandowski
    @piotrlewandowski 12 часов назад

    Pity you didn't address the most import thing here: fetching data in useEffect

  • @svrls0619
    @svrls0619 День назад

    Don't get me wrong sir, I have just idea, that the way you talk about those CR rules relates to usage of JS and VSCode. I apologize, I did not mean it wrong or bad, just idea to share.
    PS. I actually like how reflecting (on the other hand) you are towards your code.

    • @davidhart1578
      @davidhart1578  День назад +1

      Yeah that's fair, JS is so I unopinionated that there are a lot more syntax "mistakes" it allows. A more strict language simply wouldn't compile this kind of thing.
      The video itself was inspired by a PR I reviewed that had lots of "nitpick" comments but no one spotted a major issue in business logic. It's a bit contrived as I can't show actual code from my employer's app. Thanks for the thoughtful feedback!

  • @CaptainWumbo
    @CaptainWumbo 13 часов назад

    lf you have more than 10 rules / conventions in your code base and people can't get them right by hand it's a smell your codebase is entertaining OCD and will never have good reviews that catch bugs or feature spec mismatches. Linters just legitimize stupid shit like single quote vs double quote, never align assignments, always have a space after a round bracket but not a square one and a litany of other I-Never-Learned-What-Matters stuff.

  • @trigunadi4024
    @trigunadi4024 5 дней назад +1

    do people want to spend time to review code?

    • @arnthorsnaer
      @arnthorsnaer 4 дня назад +1

      Yes, code reviews are great for devs of all skill levels to learn new things, teach others but last but not least to help devs be aware of the trends in the codebase.

  • @SonAyoD
    @SonAyoD 5 дней назад

    Great video

  • @devoiddude
    @devoiddude 5 дней назад +1

    I prefer javascript, never saw the value in typescript personally.

    • @SonAyoD
      @SonAyoD 5 дней назад +3

      Wow

    • @devoiddude
      @devoiddude 5 дней назад

      @@SonAyoD I see we have a typescript fan boi here.

    • @StellaEFZ
      @StellaEFZ 4 дня назад

      Why don't you feel the value in type safety?

    • @SonAyoD
      @SonAyoD 4 дня назад

      @@devoiddude im just interested in your reasoning. I could never build any medium to large system without type safety.

    • @adambickford8720
      @adambickford8720 4 дня назад

      @@devoiddude We call them 'engineers'