Earlier quoted context omitted.
if a = foo() versus: if (a = foo()) Sometimes idiomatic patterns vary based on things which are not amiable to mechanical correction.
The trick is to ban even the correct but (to a human) ambiguous patterns. In this case, I wouldn't let you do assignment on the same line as the conditional.
Building an Inclusive Code Review Culture
71–80 of 81 posts
Re: Building an Inclusive Code Review Culture
#72Re: Building an Inclusive Code Review Culture
#73"If someone has committed many crimes against the style guide in a PR, the reviewer should point them to the style guide..." Everything a computer can do trivially should not be done by humans. There are plenty of tools available to validate code to all the standards you can dream up. And most languages allow you to even automatically fix style errors or even enforce it for compilation (thank you Go). So instead of c…
I don't have to worry about bikeshedding/yak shaving anymore and now can focus on more important problems.
Re: Building an Inclusive Code Review Culture
#74Re: Building an Inclusive Code Review Culture
#75The real problem here are people with bad attitude and poor communication skills. Bullying other people is a punishable offense in real life, and I don't see why code reviews should be any different. Have some basic rules regarding communication. Issue a public warning for first-time offenders. Give them the boot if they do it again. There, problem solved.
You sound like you didn't read the article. There's nothing about political correctness or try-hard inclusivity in that article but many (or indeed all) the things that common sense would dictate as a base of working code reviews.
Re: Building an Inclusive Code Review Culture
#76How common is it to get unsolicited reviews on your PRs? In my team, I have some colleagues who will routinely pipe up when they see a PR being uploaded by an "outsider" and will write a litany of complaints in order to block progress and establish their dominance. (I should mention that these colleagues work in a branch office, so this is their only way to assert themselves.)
This is your subjective interpretation of the facts. Learn how they complain (in the end, they only can complain about technical facts: learn them, and be correct next time), and you will not receive complaints anymore.
I'm guessing you're new to code reviews right?
Re: Building an Inclusive Code Review Culture
#77Earlier quoted context omitted.
https://cran.r-project.org/web/packages/formatR/index.html
We looked at it for our project, but it didn't work for us. Too little configuration & it made sections of code completely unreadable. I miss clang-format...
Re: Building an Inclusive Code Review Culture
#78How common is it to get unsolicited reviews on your PRs? In my team, I have some colleagues who will routinely pipe up when they see a PR being uploaded by an "outsider" and will write a litany of complaints in order to block progress and establish their dominance. (I should mention that these colleagues work in a branch office, so this is their only way to assert themselves.)
> in order to block progress This is your subjective interpretation of the facts. Learn how they complain (in the end, they only can complain about technical facts: learn them, and be correct next time), and you will not receive complaints anymore. I'm guessing you're new to code reviews right?
Re: Building an Inclusive Code Review Culture
#79Earlier quoted context omitted.
Interesting - I thought you would end the argument differently. In my experience additional visibility helps curb the unwanted behaviour because other senior devs step in and help fight it - but I guess that depends on the general culture in the company. If that doesn't happen you have bigger problems anyway.
I do believe that code review culture ends up being a reflection of general company culture. In a healthy culture, visibility tends to spread the positive part of what's observable, whereas in a toxic culture visibility tends to spread the negative and political parts of what's observable. And there's definitely a circularity here. In a healthy culture, code reviews tend not to be overly political in the first place,…
Re: Building an Inclusive Code Review Culture
#80Earlier quoted context omitted.
I do believe that code review culture ends up being a reflection of general company culture. In a healthy culture, visibility tends to spread the positive part of what's observable, whereas in a toxic culture visibility tends to spread the negative and political parts of what's observable. And there's definitely a circularity here. In a healthy culture, code reviews tend not to be overly political in the first place,…
As an engineer, how do you address this sort of mutually-reinforcing jerkery? I expect that complaining to the manager will not be effective because the culprits are not explicitly hostile.