I've seen quite a few posts claiming that Google's code quality standards are a fair bit higher than most companies including other members of FAANG. Stringent code reviews are often cited as a contributing factor. What else enables Google to hit this quality bar? How does Google incentivize engineers to spend so much time reviewing code? Or addressing tech debt / refactoring / rewriting when such hygiene tasks may jeapordize meeting deadlines? How does Google maintain developer velocity / productivity while keeping such a high quality bar? Besides code reviews, what other metics does Google use to measure the quality of a codebase? Appreciate the insight. TC: 220k
Google code is better “formatted”. You have to run the fornatting tool before you can check in the code. Now there’s a lot of google code that is not of any reasonable quality. Google code is much harder to understand in general because everyone is trying to be so smart and demonstrate “difficulty” for all the wrong reasons.
Smart people write code that’s easy to understand in general. Trying to demonstrate difficulty by making code hard to understand doesn’t make sense.
Formatted? Don't all companies do this? Most of the modern ides have formatter already. Not to mention do PRs get approved if code is not formatted properly? Also most of the companies should have precommit hooks to auto format in case the employee forgets to do that anyway. So what makes Google formatter better? Just curious
May be the Hiring Committee bar?
I should have also mentioned that there is such a thing as “readability reviewers” on almost every code change you submit. Readability is just one more set of long guidelines to follow to make sure the code is human readable.
Are there any metrics that are measured or enforced, such as unit test branch coverage must be x% or higher? Or coverage must not decrease on PR.
I think you can setup code coverage requirements by team. There is not one google wide standard.
When I was in search adtech, that certainly wasn’t the case. Where did you hear this from?
Several recent previous posts asked about code quality at Google with Google employees responding their code reviews were very detailed. The most detailed they'd ever seen.
Highly depends on the team. There's plenty of rubber stamp reviewers.