3 ms·
In reality, you need both. However, unit tests are code. If you're writing poor quality code, then you risk writing poor quality unit tests. Brittle, overly spe
by jwilliams 9y ago
In reality, you need both. However, unit tests are code. If you're writing poor quality code, then you risk writing poor quality unit tests. Brittle, overly specific unit tests can be a major burden. Even just mediocre unit tests can weigh down a project.
Code reviews have an outsized impact in the organizations I've worked in. More people understand more of the code. Quality goes up not only because the bad code is spotted, but also the reviewers can learn good practices too. You also get better at reading code. This is a fundamental, critical skill.
For this reason, I'm a fan of having developers of all skill levels be reviewers. However, code reviews are a skill and take an investment for people to learn how to be effective.
So if you're really, really having to pick, do code reviews. Use the code reviews to drive sensible, smart adoption of unit testing.