Last update: 2021-03-24
Just like in a factory, when software products are made there needs to be someone checking for quality. In a factory, a product is batch tested to ensure there are no flaws. With software, other engineers review the code changes to improve the overall product and prevent bugs.
Reviewing code is a process in which programmers look at each other’s code to improve quality. It is, in itself, a process with individual steps.
Although code reviews focus on the code the main goal is always improving the codebase. The codebase is however written by humans, which means mistakes, big and small, are inevitable. Avoiding these is the main goal, but as you will see in the overview in this chapter, there’s more to it.
This is the most obvious reason. Everyone that writes code makes mistakes. As much as you train yourself, at times you will miss things because of bias in the way you look at things, because you focus on the ingenious solution to the hard problem you’re trying to tackle or simply because you haven’t had enough coffee yet. Other people, often with a fresh look on the problem tackled in the code, can spot flaws faster. Be sure to offer them coffee though.