Live data from Hacker News

No code reviews by default

raycast.com

21–30 of 315 posts

Re: No code reviews by default

#21
Code reviews make sure the other party at least thinks a bit about the code they write. "Someone is going to look at this, let's at least tidy it up or not be cobbled together underperforming spaghetti". Sure, you can trust your co-workers but do you trust them enough that they have that thought every day of the year?

Re: No code reviews by default

#22
post #18

Absolutely not. This is a recipe for disaster and a terrible example to set for any upcoming engineers that haven’t had much industry experience yet. Code reviews help me be more confident in my own work. Even if 90% of the time it’s fine, there’s always that 10% where a second pair of eyes catches a mistake or offers a suggestion that makes the code even better.

> offers a suggestion that makes the code even better

plus, software engineering is a team sport, so if something works but is opaque, that's a fine thing to point out in a review, otherwise one runs the risk of being The "Foo Component" Owner™ and that's usually no fun and is for sure not healthy for any reasonably sized org

I am also a monster fan of the "Apply Suggestion" button in GitLab, which allows me to meet the reviewer half-way by even doing the legwork for the suggested change. If they agree, push button and we're back on track. It's suboptimal for any process that requires/encourages signed commits, but damn handy otherwise

Re: No code reviews by default

#23
Good luck getting any sort of security certification without reviews. This works fine for small companies, but once you start getting customers at a certain scale it will be a dealbreaker. Run without reviews as long as you can, it feels great!

Re: No code reviews by default

#24
post #7

He mentions "trust" a lot. Is that why we do code reviews, because we don't trust each other? I find this attitude problematic. We do code reviews because humans make mistakes. Requirements can be misinterpreted. Different work in progress can be in conflict with each other. Reviews are a good way to learn from each other and keep abreast of what work is occurring outside your own bubble. Not doing code reviews becau…

We (at least should) also do code reviews in order to make sure everyone understands the code.

On my team, the majority of code review comments are not discussing potential bugs, they're making sure everybody knows how the new thing works, why it was designed that way, implementation tradeoffs, etc. All that discussion is extremely valuable over the long run. For example, it means that nobody has to pay attention to email while they're on vacation in case something goes pear-shaped with a module they implemented.

That said, I 100% agree with the article's concluding paragraph about YMMV. Raycast is operating in an entirely different business domain from the one I'm in. It sounds like the reasons why Raycast likes their way of doing things don't really apply to us, and I don't think the reasons why we like our way of doing things don't really apply to Raycast.

Re: No code reviews by default

#25
post #18

Absolutely not. This is a recipe for disaster and a terrible example to set for any upcoming engineers that haven’t had much industry experience yet. Code reviews help me be more confident in my own work. Even if 90% of the time it’s fine, there’s always that 10% where a second pair of eyes catches a mistake or offers a suggestion that makes the code even better.

Meh. If 90% of the time it's a mindless ritual there is probably a better way to achieve the same goal. Code reviews are a huge time sink, especially for unimportant style- and naming nits.

Code review as mentoring can be great, if it's a directed 1:1 effort. Usually, it is not.

Re: No code reviews by default

#26
This is an interesting read and I'm glad to see that the closing paragraphs emphasize the need for each team to evaluate their own needs. That said, for me it all comes down to the definition of "best product" in this statement:

"They all want to build the best product in the shortest time possible"

From my perspective, the "product" is not limited to what customers see or the code itself. It's the set of outcomes from the code being written and executed. For example... Do other engineers understand the code? Can they support it efficiently? Does it fail gracefully? What is the impact of failures? Are failures automatically detected? Does it lead to security breaches? Did the code author learn things they could do better that they didn't know to ask about? Did other engineers learn from reading the code or asking questions? Are customer requirements satisfied? How much is customers' trust impacted by failures, bugs, and feature that don't meet requirements? How big is your cloud provider bill? Etc...

If the priority is quickly delivering and iterating on features that satisfy customers' needs AND engineers will be supporting their own code, then the "No Code Review by Default" approach has its merits. In fact, I have personally found this approach to work well on constrained, isolated pilot projects where the priority is to unblock key scenarios for a limited set of customers and/or learn about customer needs before building a the "real" solution.

For anything else, I would suggest following the author's own advice: "ask yourself if the circumstances of others apply to you".

Re: No code reviews by default

#27
post #7

He mentions "trust" a lot. Is that why we do code reviews, because we don't trust each other? I find this attitude problematic. We do code reviews because humans make mistakes. Requirements can be misinterpreted. Different work in progress can be in conflict with each other. Reviews are a good way to learn from each other and keep abreast of what work is occurring outside your own bubble. Not doing code reviews becau…

Yeah, IMO this is like a publisher saying "we don't have editors: we trust our authors". The intended ethos of editors and code review is that mistakes and imperfections are the norm, and you need a second pair of eyes to iron them out.

That said, I do sometimes encounter individuals or cultures that seem to view code review more as a mechanism for catching abnormal/unexpected mistakes than as a normal part of the process of writing code.

Re: No code reviews by default

#28
Sounds nice but perhaps a best fit if you are 1) a small team 2) people know and trust each other already 3) people are all and equally comfortable asking for reviews (disturbing others, essentially). 4) the code has a priority on feature progress rather than stability and correctness.

The situation can be very different in any of those aspects and mandatory review can still be a good idea. Are you building code that runs on surgery equipment together with 4 people you just met? I think you should probably have a formal review process. Or are you iterating towards an MVP for some webapp with a few people you consider friends? Lgtm just deploy to prod.

Re: No code reviews by default

#29
post #14
post #7

He mentions "trust" a lot. Is that why we do code reviews, because we don't trust each other? I find this attitude problematic. We do code reviews because humans make mistakes. Requirements can be misinterpreted. Different work in progress can be in conflict with each other. Reviews are a good way to learn from each other and keep abreast of what work is occurring outside your own bubble. Not doing code reviews becau…

If something hit production and caused a major fuck-up because there was no peer review process, then in all the places I've worked at the first action item in the post-mortem would be "we should introduce peer review." Otherwise someone would ask how we could ensure it wouldn't happen again, and no one would be able to say "because we trust them," and leave it at that. It would sound more like "I trust you will neve…

Causing a major fuck-up in production is probably also a sign that you need better release validation and deployment practices.

Re: No code reviews by default

#30
Early in my career I was like "cool, I can just merge this to master". Now after working in several projects and in several small and large teams, I am like "Gez, I can't merge this straight to master. I need a second pair of eyes on this"
Post reply on HN