It helps you create higher-quality software.
It enables your team to be more cohesive and deliver software projects
on time.
It can help you find more defects and inefficient code that unit tests and
functional tests might miss, making your software more reliable.
There are many ways to conduct code reviews. Some
organizations use specialized applications such as Gerrit,
and others conduct reviews as if they were professors
grading college papers. Whatever process you use, the
following are some good practices to help make your
code review effective:
Use a code review checklist that includes organization-specific practices
(naming conventions, security, class structures, and so on) and any
areas that need special consideration. The goal is to have a repeatable
process that is followed by everyone.
Review the code, not the person who wrote it. Avoid being robotic and
harsh so you don’t hurt people’s feeling and discourage them. The goal
is better code, not disgruntled employees.
Keep in mind that code review is a gift. No one is calling your baby ugly.
Check your ego at the door and listen; the feedback you receive will
make you a better coder in the long run.
Make sure the changes recommended are committed back into the code
base. You should also share findings back to the organization so that
everyone can learn from mistakes and improve their techniques.
EXAM PREPARATION TASKS
As mentioned in the section “How to Use This Book” in
the Introduction, you have a couple of choices for exam
preparation: the exercises here, Chapter 19, “Final
Preparation,” and the exam simulation questions on the
companion website.
REVIEW ALL KEY TOPICS
Review the most important topics in this chapter, noted
with the Key Topic icon in the outer margin of the page.
Table 2-2 lists these key topics and the page number on
which each is found.