What is a code review?
Options
- Counting how many lines of code someone has written
- Another developer reads your changes before they are merged (Correct option)
- The compiler checking the syntax of all the files
- A demo of the finished product for a customer
Answer
Another developer reads your changes before they are merged, to catch bugs, improve quality and share knowledge
Why
In most teams you cannot put code in the main branch alone. You open a pull request, and teammates comment on it.
A review looks for bugs, unclear names, missing tests, security problems and consistency with the rest of the code.
Good reviews are polite and specific, and they teach both sides something.
Remember
Code review = teammates check your change before merging.