In most of the jobs I've had peer code review was an essential and regular part of the software development process. My experience is that it improves code quality and is well worth the effort. I'd also say that at least half of what I learnt in that time was through code review. Either someone would suggest improvements to my code, or I'd discover new ways of doing things from reviewing other people's work. It's a great way to share knowledge. This is not only true in specialist domains where the answers are not always easily found by searching the web, but any time someone is not aware of a better way of doing things. You won't search for something if you don't know it exists. That's my opinion, but there is also plenty of evidence that code review improves code quality, helps find bugs early and ultimately saves money. The numbers vary between studies, but finding bugs early is not just cheaper, it's significantly cheaper.
No doubt some people will say that the purpose of unit testing is to find bugs early or, in the case of TDD, prevent them ever being created. So why do we need code review as well?
I agree that unit testing is powerful, indeed I've used TDD thoroughly to tame some seemingly intractable problems, but I still highly value code review. I think testing and code review achieve different things. Both are important.
Unit tests are great for quickly checking that everything that worked previously still works after a recent change. They provide confidence to refactor or experiment with code in the knowledge that the essential functionality can be quickly checked and rechecked. Achieving this via a code review would be slow, boring and error-prone.
Code reviews on the other hand can ask bigger questions, like:-
In fact, any check that can't be automated. Coding style, static analysis, spell checking etc can all be automatic and the most a human reviewer should do is check the results.
Others have already written good things about how to conduct code reviews without annoying people or what tools you should use, so I won't repeat that. Here are my observations and suggestions about how to get the most out of code review:-
I write about whatever is on my mind. I do so mostly to help me think more clearly. If other people find it interesting that's good too. :-)
I discover new ways of doing things from reviewing other people's work. It's a great way to share knowledge.
The most important thing for a code review to check is whether the code is functionally correct