Earlier quoted context omitted.
> that's because the UX for github PRs sucks. Use Gerrit instead. It's not as pretty but it's super productive. That won't affect the quality of what people find and comment about. > that's not a problem caused by code review, it's caused by people who don't know how to work with others (or otherwise simply refuse to). to the degree that the code review process shines a light on this, that's good news, because that's…
sounds like you just work at awful jobs. i wouldn't stay at companies with the problems you describe above. wishing you good luck.
No code reviews by default
261–270 of 315 posts
Re: No code reviews by default
#262This a far bigger issue for me than a lack of trust. Code reviews should be a high priority for your engineers, especially the senior ones.
Re: No code reviews by default
#263Maybe this is part of the problem?
Why do we need to build so incredibly quickly? Is this the only way?
Re: No code reviews by default
#264> Pull requests don't prevent bugs. I remember once I was giving a talk on code review and I said that code review doesn't prevent bugs and people were shaking their heads. Everyone hangs on to this one thing, but if you look at the majority of pull requests that have been approved you'll see a lack of comments about pontential bugs. Also, if you do see a comment about bugs they'll often be disregarded. This drives m…
It sounds like your company has a shitty culture. I've never had issues with code reviews in the companies I worked at. One company was particularly rigorous, where we had to print it ou on paper, and a room of engineers would go over things line by line. But that also had the best engineered software I had seen in my career. Any issues of style should be in the style guide. Anything not in the style guide can be ign…
People say this a lot then I look at their code reviews and their code reviews are basically the same. As I said in another comment the root cause of this crappyness is the fact that the majority of people can't code review for crap and they're rushing it.
> Any issues of style should be in the style guide. Anything not in the style guide can be ignored. Or the style guide should be updated.
This doesn't stop people asking. I have a default comment "This is a code style change and as a rule I don't do code style changes unless it's required by the code style guidelines because everyone has their own preferences for code style. If I was to do this change then I would have to do other change and that would result in lots of pull requests being updated just because the specific reviewer wanted it one way and then another reviewer on another pull request wanted it another way." Sometimes then go and have the code style changed stating "Iain won't do code style changes unless they're in the guidelines" which I personally feel is a bitchy comment about the fact they just bikeshedded on my pull request and I wouldn't the change.
> If the person doesn't want to make the change for the technical problem, then that's a culture problem in the team or company.
Here comes the crux, what if the other person just disagress with your assessment and decides the technical problem doesn't exist or business value of changing it makes it a bad idea to change? For example, in code review I create a table and someone comes a long and says that tables with a large number of columns is a performance issue. I disagree and point out that splitting it out and having multiple tables with joins is a performance issue. Now we have a whole confrontation. Someone points out a valid issue that would affect 1 out of 1 million users and would take 3 days to fix. Again confrontation. Sure you can say with the right culture these issues are easy to work around but the fact is office politics is such a big thing we have a phrase for it which everyone understands. So many people are trying to advance their careers that they all want to be seen as really good. And for most people the way they look good is by making someone else not look good.
Re: No code reviews by default
#265He 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…
> Is that why we do code reviews, because we don't trust each other? I don't see any other reason to require code reviews before a change can be merged. > humans make mistakes Then write unit tests, religiously. And pair. Or "... request reviews when they think it's necessary". In my experience code reviews are not very good at catching mistakes. > Different work in progress can be in conflict with each other. Code r…
In the US, a SOC 2 audit of your org’s change management process is going to be a really bad time without this.
Re: No code reviews by default
#266Earlier quoted context omitted.
I've had a lot of trouble getting people to do proper reviews. A minimum to me is that you actually compile and execute the code in some way to check its sane. Better would be the reviewer actually adds to the test suite for the code to prove their expectations of how it works. In almost all cases it's very hard to get people to look outside the web browser for the diffs. Diffs show you something, but never the whole…
Why should it be on the reviewer to compile and execute the code, rather than the author? Or are you saying that one can actually find more bugs when two people compile and execute the same code rather than just one? When I review code, I want the author to tell me how they have verified that the code has the desired effect -- but if they do that, I'm going to trust that they did the actual verification and I'm not g…
1) Catch edge use case / business requirements misunderstandings
2) Mentor new hires/junior engineers on the ways things should be done (e.g. internal culture about some architecture/design).
BUT, I absolutely despise code reviews that nitpick on non documented or 'because I prefer that way' stuff:
1) Task tickets that only have a vague description, have their own 'play detective' about the requirements, but a lot of new ones surface during code review.
2) Requirements are met, but there are internal/personal technical directives that are written nowhere, are not enforced with automated checks and may dramatically change a feature/patch is implemented (I can only think about that guy that worked in a company in which only LEFT JOIN sql statements were allowed).
Fuck that noise.
Re: No code reviews by default
#267Earlier quoted context omitted.
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…
This strikes me as weird excuse for code reviews. To spot quality problems before going to production .. what you need is testing. Not "unit testing" - which is just another pointless process that does not actually provide the purported benefits. You need a separate QA team that handles testing - manual and automated.
Your quality problems might well come from poor or non-existent architectural decisions and tech-debt, and QA won't pick up on that stuff unless it manifests as a faulty requirement.
The earlier you catch a problem, the easier it is to fix.
Re: No code reviews by default
#268In my experience, code reviews are awful in the same way that micromanagement is awful. It's based on a lack of trust, first and foremost. It's also insulting. What's more insulting is being forced to deal with unreasonable review comments.
More than once, I had the experience of spending several days working on a feature, only to be blocked by some unreasonable "team member" who has weird fetishes about spacing and variable names and such fluff. It's really frustrating and insulting.
What's more, it doesn't really contribute anything to actual code or product quality.
The overwhelming sentiment I see on comments supporting the mandating of code reviews on every single commit seems to be based on the idea that everyone is a junior who makes obvious mistakes that are easy to catch by just having someone else take a look at the code.
I suppose this should not be very surprising.
I've noticed in the last few years more and more companies prefer to hire beginners (since they are cheap), and there's a huge wave of people who are learning programming to improve their careers and their lives -- which is a good thing for these people -- but it means a lot of teams are full of newbies.
So it makes sense in this context to install a lot of "guard rails".
What I don't understand is why everyone thinks mandating code reviews is a good idea in the general case.
Re: No code reviews by default
#269Earlier quoted context omitted.
> I want my code peer reviewed TFA: > Engineers [..] request reviews when they think it's necessary. Problemo solved.
Sure. But if you read my previous message this relies on people being comfortable asking. I am but not of my colleagues are. The formal process would let them use the benefit that I can use when I think it’s necessary.
Then that's what you need to fix.
Re: No code reviews by default
#270Earlier quoted context omitted.
> I want my code peer reviewed TFA: > Engineers [..] request reviews when they think it's necessary. Problemo solved.
Good engineers will ask for code review. Most engineers won't.
...when they need it. Actually, really good engineers will ask to pair when they need it. Review is a distant second.