Live data from Hacker News

No code reviews by default

raycast.com

11–20 of 315 posts

Re: No code reviews by default

#11
In my experience, code reviews promote trust. They make changes a collaboration and a conversation, where reviewers and implementor(s) bring different intuitions and concerns, and help expand understanding of risks and goals. Sure, a lot of that can happen before any code is written, but it’s inherently more abstract.

Code reviews aren’t just about code, and probably shouldn’t be framed that way.

Re: No code reviews by default

#12

I think this would work really well for a small and experienced team, though where I work, we have a lot of developers fresh out of college, and I would be pretty nervous setting them loose without close review of their work.

Especially because a HUGE benefit of code reviews is exposure and knowledge transfer. For us it's a key area where anyone can get insight into the how and why, plus control their participation from requester/reviewer to passive observer. It's actually a pretty poor place to catch bugs introduced by new, junior devs.

Re: No code reviews by default

#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 never make that mistake again," which sounds more like a threat. You also can't go to your clients and say "sorry, we let our team deploy stuff without reviewing because we trust them... so please continue to deal with our avoidable problems."

Thing is, I've lead my fair share of teams and I trust my team-mates and colleagues implicitly. It makes for a strong team. But we still do code review (peer review) because we want to build software that works well and support each other. We're not in the job to simply deploy code to prod as quickly as possible.

I'd also add that I think any software engineer should try and have the experience of working in a highly regulated field, like healthcare. It's hard to get an appreciation for why these things exist until you realise you're held to a much higher level of accountability because your oopsie moments can have much larger consequences. For me, it's been hard to go back to my old, cavalier attitude after that.

Re: No code reviews by default

#15
This can not be posted too many times.

https://www.youtube.com/watch?v=4XpnKHJAok8

Linus Torvalds talk on Google about how GIT is more a way of working then a piece of software. Everybody commits upwards in a tree of trust. If you do it this way you get automatic code reviews and in any team someone should be responsible for the "product" anyway and highest up in the hierarchy.

Re: No code reviews by default

#16
1. Let's separate the idea of code review from the GitHub Pull Request feature. They are often coupled, but they don't need to be. You could easily have a policy and a workflow that requires reviews, but doesn't care whether they happen before or after a merge. I'm pretty sure this is how things work at Etsy, and I know there to be a diversity of code review practices more broadly in high-performing engineering organizations.

2. Of course code reviews don't catch all bugs. This is the same argument that is frequently used to reject static type systems and memory safety. The purpose of code review is to ensure that more bugs are caught, the kinds of bugs that can be caught through code review. It also helps ensure that a high level of code quality is maintained, and that at least two people understand how a change works, which is good for team cohesion and resilience.

Re: No code reviews by default

#17
He basically described the classic subversion workflow using git. I feel like people rediscover subpar approaches using technologies which intended to evolve those approaches into a better workflow

Re: No code reviews by default

#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.

Re: No code reviews by default

#19

I think this would work really well for a small and experienced team, though where I work, we have a lot of developers fresh out of college, and I would be pretty nervous setting them loose without close review of their work.

The idea is not that everyone has to be omnipotent, it's that you trust people enough to send for review and ask for help when appropriate, instead of always. I.e. when you're new to the code base or language.

Re: No code reviews by default

#20

I'm glad this works better for them, or at least they feel that it does. I'd also bet that they're either a small minority of teams that jell so well that they manage to scale a codebase without it turning into a disgustingly inconsistent mess; or that indeed their codebase qualifies as such or is still too small for the effects to be very visible. Code reviews are not a tool intended mainly to catch bugs. Types, aut…

> Code reviews are not a tool intended mainly to catch bugs

Well, not to detract from your point (I agree), but what little research has been done in this area suggests that code reviews are actually one of the best ways to catch bugs: https://kevin.burke.dev/kevin/the-best-ways-to-find-bugs-in-...

Post reply on HN