Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Code reviews kill velocity - introduce context switching, and are make work

This is the same point three times, and I don't agree with it. This is like saying tests kill velocity, there's nothing high velocity about introducing bugs to your code base.

Everything introduces context switching, there's nothing special about code reviews that makes it worse than answering emails, but I'm not going to ignore an important email because of "context switching."

Everyone makes mistakes, code reviews are a way to catch those. They can also spread out the knowledge of the code base to multiple people. This is really important at small companies.

CI is great, but I have yet to see a good CI tool that catches the things I do.



> This is the same point three times

No it isn’t. Fake work, synchronization, and context switching are all separate problems.

> code reviews are a way to catch those

I said you can do reviews - but there is no reason to stop work to do them.

Why not require two or three reviews if they are so helpful at finding mistakes?

I agree everyone makes mistakes - that’s why I would design a process around fixing mistakes, not screening for perfection.

How many times have you gone back to address review comments and introduced a regression because you no longer have the context in your head?


> Why not require two or three reviews if they are so helpful at finding mistakes?

Places do? a lot of opensource projects have the concept of dual reviews, and a lot of code bases have CODEOWNERS to ensure the people with the context review the code, so you could have 5-10 reviewers if you do a large PR


Does it make the code better? The best projects are the ones with the most review l?


> Why not require two or three reviews if they are so helpful at finding mistakes?

For secure software, e.g. ASIL-D, you will absolutely have a minimum 2 reviewers. And that’s just for the development branch. Merging to a release branch requires additional sign offs from the release manager, safety manager, and QA.

By design the process slows down “velocity”, but it definitely increases code quality and reduces bugs.


Once again let me reframe the mindset. Trying to get a perfect change where you anticipate every possible thing that will go wrong beforehand is impossible - or at least extremely costly. The alternative is to spend your effort on making it easy to find and fix problems after.


You are not anticipating every possible bugs. It's mostly a learning experience for you and the team if it's done correctly. Someone may proposes another approach, highlight certain aspects that needs to be done "right" (definition may vary), let you know possible pitfalls, etc... It's not always LGTM.


> No it isn’t. Fake work, synchronization, and context switching are all separate problems

Context switching is a problem because it...kills velocity. Fake work is a problem because it kills velocity. You're saying it's time that could be better spent elsewhere, but trying to make it sound wider. I disagree with the premise.

Synchronization is a new word, unrelated to what you originally wrote.

> How many times have you gone back to address review comments and introduced a regression because you no longer have the context in your head?

Never? I am not unable to code in a branch after a few days away from it. If I were, I would want reviews for sure! Maybe you have had reviews where people are suggesting large, unnecessary structural changes, which I agree would be a waste of time. We're just looking for bug fixes and acceptably readable code. I wouldn't want reviewers opining on a new architecture they read about that morning.


> Synchronization is a new word, unrelated to what you originally wrote.

I believe you can figure it out.

> Never?

Ok well I’m trying to talk to people who have that problem. Because I and my team do.


I guess they say never, because if you have descriptive commit messages and write good PR description, it's easy to regain the context surrounding the change. It's all about communication, both to others and your future self.


> Why not require two or three reviews if they are so helpful at finding mistakes?

Diminishing returns, of course. I have worked places where two reviews were required and it was not especially more burdensome than one, though.

I catch so many major errors in code review ~every day that it's bizarre to me that someone is advocating for zero code review.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: