Live data from Hacker News

Ask HN: Does "trust" eliminate the need for code reviews?

news.ycombinator.com

1–10 of 77 posts

Ask HN: Does "trust" eliminate the need for code reviews?

#1
There is a thread on LinkedIn purporting that it is a good practice to not review first, but to merge first, for the sake of high velocity.

https://www.linkedin.com/posts/pete-heard-lr_git-activity-7129496167645618176-Viyp

I am curious if anyone else has any thoughts regarding this matter.

Re: Ask HN: Does "trust" eliminate the need for code reviews?

#4
Oof. Difficult one. I've dealt with multiple people and there are some I would blindly trust because I know they would do the right thing.

On the other hand I've worked with people who need more reminders (eventually we had to discontinue our relationship) to do the right thing:

Does the PR make sense?

Did you format the code?

Did the tests pass?

Did you fix the tests? Or did you just comment them out?

And for the people I trust, it's because they insanely high quality of code, consistently. And even for them, while I DO trust them, I prefer PRs.

4 eyes see more, and we have different mindsets.

Re: Ask HN: Does "trust" eliminate the need for code reviews?

#5

No. I trust myself. I still want someone to review my work. If nothing else than to essentially catch typos. You can’t proofread your own output.

I agree in general that there needs to be at least some level of review (typos, etc.), not necesssarily to catch big but subtle issues.

On the other hand, I've had it where small (single character!) PRs have to wait for several days because I need to keep bothering my team to review them. But this seems like a problem that solvable organizationally somehow (not sure how?) rather than by eliminating an important part of the process.

Re: Ask HN: Does "trust" eliminate the need for code reviews?

#6
HELL NO. The point of mandatory code review to ship is a protection mechanism to force another coder to validate what has been presented to be safe for deployment. Coders today are still (mostly, for the time being) human and still make mistakes.

Perhaps it should be possible to bypass code review and smoke testing for minor changes to code comments that do not change production artifacts.

Another problem is creating sufficiently appropriate test infrastructure to retest the area(s) touched and exponentially/phase deploy looking for positive and negative signals.

Re: Ask HN: Does "trust" eliminate the need for code reviews?

#10
Rather than not have code reviews at all, I advocate for having less intense code reviews. Does this code look like it should work? Does it fit with the house style? Are there any obvious errors or blind spots? Beyond that, it’s the responsibility of the author to produce working code.
Post reply on HN