| ▲ | ardeaver 12 hours ago | |||||||||||||||||||||||||||||||||||||||||||
When I was really early in my career, a mentor told me that code review is not about catching bugs but spreading context (i.e. increasing bus factor.) Catching bugs is a side effect, but unless you have a lot of people review each pull request, it's basically just gambling. The more expensive and less sexy option is to actually make testing easier (both programmatically and manually), write more tests and more levels of tests, and spend time reducing code complexity. The problem, I think, is people don't get promoted for preventing issues. | ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | VorpalWay 5 hours ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||
This depends on the industry. I work on industrial machine control software, and we spend a huge amount of time on tests. We have to for some parts (human safety crtitical), but other parts would just be expensive if they failed (loss of income for customers, and possibly damaged equipment). The key to making this scalable is to make as few parts as possible critical, and make the potential bad outcomes as benign as possible. (This lets you go to a lower rating in whatever safety standard applies to your industry.) You still need tests for the less critical parts though, while downtime is better than injury, if you want to sell future machines to your customers you need to have a good track record. At least if you don't want to compete on cost. | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | asdfman123 5 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
One of the major things code review does is prevent that one guy on your team who is sloppy or incompetent from messing up the codebase without singling him out. If you told someone "I don't trust you, run all code by me first" it wouldn't go well. If you tell them "everyone's code gets reviewed" they're ok with it. | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | bluGill 11 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
> people don't get promoted for preventing issues. they do - but only after a company has been burned hard. They also can be promoted for their area being enough better that everyone notices. still the best way to a promotion is write a major bug that you can come in at the last moment and be the hero for fixing. | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | bloppe 6 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
I think of code review more about ensuring understandability. When you spend hours gathering context, designing, iterating, debugging, and finally polishing a commit, your ability to judge the readability of your own change has been tainted by your intimate familiarity with it. Getting a fresh pair of eyes to read it and leave comments like "why did you do it this way" or "please refactor to use XYZ for maintainability", you end up with something more that will be easier to navigate and maintain by the junior interns who will end up fixing your latent bugs 5 years later. | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | 8note 11 hours ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||
> The problem, I think, is people don't get promoted for preventing issues. cleaning up structural issues across a couple orgs is a senior => principal promo ive seen a couple of times | ||||||||||||||||||||||||||||||||||||||||||||