4 ms·
I've experienced some really toxic cultures around code reviews. I believe the bottom line is teams need to set standards; linters and findbugs should be incopo
by marktangotango 10y ago
I've experienced some really toxic cultures around code reviews. I believe the bottom line is teams need to set standards; linters and findbugs should be incoporated in the build and fail the build if formatting standards aren't met. Standards for level of abstraction should at least be discussed. Is using exceptions for control flow ever allowed? Requirements should not be defined in code reviews. I go so far to say that code beautification comments should be handled in separate tasks.
Above all code improvement requirements and comments should be based on industry defined best practices, like citing SOLID principals for example. Or, citing agreed upon team standard for appropriate level of abstraction. In short, there has to be a limit to the pissing matches.
I spent six months in a Big Dumb corp that did none of the above. Every team member reviewed everything and every comment had equal weight. Code review participation was part of the performance review process. Sounded nice in theory, but incentived a truly toxic environment of "my solution is more clever" and "my solution is better use of abstraction". Which resulted in a spaghetti mess of over engineered code that still had bugs, and still didn't meet requirements, even after 100's of hour of reviews.
- sgift 10y ago> Which resulted in a spaghetti mess of over engineered code that still had bugs, and still didn't meet requirements, even after 100's of hour of reviews. One would think the first check in any review is "does this code do what it should do?" and stop the review right there if it doesn't. As a professor of mine once said "code that crashes fast and efficient doesn't help anyone."
- KKKKkkkk1 10y agoYour last paragraph resonates. Having some experience with this process, I'm convinced that a few years from now, mandatory code reviews will be the silver bullet of yesteryear. Ultimately, it's just another attempt at solving the unsolvable problem of "I hired lazy shitty engineers and I need a way to quality-proof their code." If you don't have this problem, don't bother with code reviews.
- AnimalMuppet 10y agoNo, still do reviews. Reviews catch bugs and problems - not all of them, but more than zero. They're worth doing. They also do a bit of cross-training, which is of some value.