Ask HN: In your company, how important is code quality vs. getting things done
In my case I work at Google. Company-wide, we aggressively push code quality. You cannot submit code without someone reviewing it. You cannot submit code in a language in which you aren’t certified as proficient without someone with proficiency (called readability) reviewing it. Our review tools run automated code quality heuristics and present negative results to the reviewer. All affected unit tests are run when you request review and all negative results are highlighted. You can’t modify another team’s code without their approval at review time. We have an entire team dedicated to performing modernizing refactors across our entire codebase to remove deprecated methods, migrating to new language features, etc. Unit testing isn’t strictly enforced, but we have automated dashboards that will show you your coverage and guilt you if it’s poor. This is just the stuff I can name off the top of my head.<p>The result of all this is that even if a team wants to just get things done, they’re going to be nudged in the direction of better quality simply by using our tools.<p>As for my team, I work in Ads. We’re a group of just over half a dozen people operating a handful of revenue-critical systems, and our code quality standards are raised accordingly. From a management perspective, it doesn’t make sense to hire a group almost entirely composed of PhDs and then have them spend their time putting out fires caused by sloppy implementstions. We put a lot of effort into getting the code right at the outset and then running it for years without need for massive intervention.<p>In my experience this involves a few things. First, we tolerate a fair bit of deadline slip. Google isn’t exactly gonna go broke without our newfangled product, so if we need an extra half a quarter to make it happen right, then we take it. Secondly, we write up thorough design documents before breaking ground. This means few surprises at implementation time, letting us focus on getting the code right. Finally, we spend a lot of time refactoring and cleaning things up. Systems balloon over time, and sometimes it’s more cost effective to clean house and make otherwise complex changes simple. Doubly so if subsequent changes are also made easier.<p>I can’t speak for the rest of the company, but I think our team’s standards are pretty high.