Live data from Hacker News

How to run a miserable code review

badsoftwareadvice.substack.com

91–100 of 122 posts

Re: How to run a miserable code review

#91

Earlier quoted context omitted.

I think "fyi" comments are valuable in PRs. Often all I want is for my team to approach similar problems differently in the future, not necessarily to refactor the immediate code. Or at the very least consider alternative approaches

Also nit:

Yes, for sure.

Although I much prefer to add automatic code formatting and linting and stuff to codebases to dramatically reduce the occurrence of 'nit:'

Re: How to run a miserable code review

#92
post #68

Earlier quoted context omitted.

The problem with this advice is that, at least in this story, if we're taking it at face value, the antihero programmers didn't learn.

I read it as weren't given the opportunity to learn, and didn't a have a mentor to teach them.

If they wanted a mentor it was one part wet nurse and one part Mr. Rogers.

There were no adults in the room.

Re: How to run a miserable code review

#93
post #67

Earlier quoted context omitted.

I dunno mate, I think adults should be able to handle being chortled at. You're responsible for your own emotional state. If you've done something laughable (or even if you haven't), then don't be surprised when people laugh. Taking it personally is optional and not recommended.

I agree that people shouldn't be too thin-skinned, it's still important to stay civil and supportive. Being able to clearly and unambiguously convey that a change sucks while not hurting the other person's feeling is a useful skill to practice. (It's okay to fail at it, too, as long as you're aware that that's almost always a weakness.)

The issue is the broad, ambiguous, definitions of things like "civil". In many cultures (eg. French, Russian) a direct, no-nonsense communication style is the default. You can just say things like "Your idea is hilariously stupid" and no one really gets bent about it. In the world of multicultural, international business, this seems like the most viable default, simply because it's the easiest to codify and communicate. Trying to teach very culturally-specific minutia of civility to a diverse staff just gets in the way.

I'd rather work somewhere the burden of not being offended is placed on the listener, not the speaker. Somewhere we can just say what we think.

Re: How to run a miserable code review

#94

Earlier quoted context omitted.

To be fair, it's not always a bad idea to present such ideas. However you need to make the comment resolvable, or better yet, create an issue for refactoring, add a small "fyi" comment and let them resolve it when they read it. This way they are aware of possible upcoming changes to this code but the MR/PR is not blocked.

I think "fyi" comments are valuable in PRs. Often all I want is for my team to approach similar problems differently in the future, not necessarily to refactor the immediate code. Or at the very least consider alternative approaches

Also such "fyi" comments can be a great way to get the refactoring discussion outside of just your own head. It can be a good start to boiling down the reasons for your refactor and getting external buy-in/validation that you are thinking down a useful path to the entire team and not just your own ego.

Re: How to run a miserable code review

#95
post #55
post #11

Earlier quoted context omitted.

What, those are rookie numbers! I opened a pull request 13 business days ago. I even rebased it multiple times when conflicting code was otherwise merged. There’s been no feedback whatsoever. Everyone even remotely involved is now on vacation. (It’s not like I care either, the project sucks anyway.)

The best is when the only possible reviewer is your Engineering Manager because you have no other engineers in your domain on the team.

That's lucky to have a manager who even logs into GitHub. Many jobs of mine I have been my own approver.

Re: How to run a miserable code review

#97
post #36

Earlier quoted context omitted.

YMMV but i work at a place where * code review is expected responsibility, so everyone participates in every part of it regularly, so they are also incentivized to keep the process sane * we have an auto linter and we recommend saving on fix specifically so no one argues about useless style nits * CR back and forth is measured in minutes or hours so you are not waiting days to resolve someone’s drive by comment * CR…

> * CR feedback always has a specific action item that is easy to address Then CRs are pretty much pointless. The feedback I want as a senior developer is the complex stuff and that is half of the time not easy to address. The trivial stuff I usually, but not always, spot myself when checking the code before sending it for a review.

You ideally want that earlier and more high level than a code review.

If you are doing system/algorithm design in the code review, it’s not meant for that.

The action item can also be “can we create a issue to track and discuss this further”

Re: How to run a miserable code review

#98
post #38

Earlier quoted context omitted.

Review can also effect maintainability; the code should ideally be parseable by other people on the team with little context of the specific project. And it should ideally spread knowledge of the code to at least one other person.

But in this case, I think it might be related with the background/knowledge/ways of coding difference between the maintainers?

If you’ve worked together long enough, hopefully you are all coding in a common way that everyone can read.

A lot of stuff is codifiable as well. Shove your lint config in the repo, since you should all share a code style.

Re: How to run a miserable code review

#99

Earlier quoted context omitted.

To be fair, it's not always a bad idea to present such ideas. However you need to make the comment resolvable, or better yet, create an issue for refactoring, add a small "fyi" comment and let them resolve it when they read it. This way they are aware of possible upcoming changes to this code but the MR/PR is not blocked.

I often add multiple comments and then approve the pr. My main question is always: does this make the codebase overall better or worse for some definition of good? If that bar is met, iterative improvements should not block deployment/merge. This way the value of the pr process is captured: preventing obviously bad changes from reaching prod and two-way knowledge sharing. Setting a higher bar for reviews more often t…

I always make sure that author can resolve my comments. If they can't do that, the pr is not approved - because I would like them to address something. If I approve it, then each of my comments should be resolvable.

Re: How to run a miserable code review

#100
post #31

(honest question, please do not downvote): Why the tech industry still relies in the CR as a quality assurance/correctness process?

There are a lot of qualitative reasons: it helps spread knowledge of changes in the code, it helps maintain a consistent style, shares knowledge, etc. However when it comes to quality assurance and correctness (if these terms collectively mean, preventing defects ) then there's little evidence that it is an effective practice [0]. If the changes proposed are less than a couple hundred lines of difference and the revi…

Test automation is also written by humans, so while there are some improvements to be made for productivity, it’s definitely not foolproof, so it’s good to have multiple layers of defense.
Post reply on HN