Knowledge Transfer

Ethickfox kb page with all notes


Project maintained by ethickfox Hosted on GitHub Pages — Theme by mattgraham

Code review results in several benefits

The Risks of Neglecting Code Review

Code Review Types and Workflow

Code Review Workflow

No matter what type of code review your team chooses, there is a universal workflow that applies.

87.png

Key Areas of Code Review

Your team’s code review should cover several major areas.

Code Review Checklist

A code review checklist ensures that:

Every member of a team can contribute to the creation of a code review checklist for a project. To create a checklist, you need to take several steps.

As your team develops a code review checklist, tailor the final document to the goals of code review and keep these tips in mind:

  1. Reaching your code review goals can require a different number of reviewers with a range of expertise. If the goal is knowledge sharing, it is better to engage more reviewers, including new or junior team members. However, focusing on quality or security standards requires participation of the most experienced specialists.
  2. Peer review should be mandatory for each piece of code your team produces, while a specialist’s review is mandatory for critical parts only. This approach applies to every code review, regardless of its goal.
  3. Pay special attention to high-risk code that implements critical business logic, is performance-critical, or handles sensitive data. High-risk changes are the ones that are most likely to hide mistakes: this might be code written by a new member of the team or code that has been affected by large-scale refactoring.
  4. Checklists are living documents that evolve, and every team member must be responsible for updating them. Make it a habit to review the checklist every time you face issues or unclear aspects of the code review process and examine the code review process periodically—for example, during retrospective sessions.
  5. Checklists must be accessible to everyone on the team through a shared space, like Confluence or Teams. To make a checklist even more accessible, pin it in your team’s communication channel.

Although creating a checklist is time-consuming and maintaining it requires all team members’ commitment, the long-lasting results are worth the effort.

Developers’ Checklist

A developers’ checklist should contain a set of affirmatives. Here is a generalized list; remember that you might need to adapt it for your project.

If you are a developer, it is best to review your code after completing the whole change request (not just its pieces) as if you are its initial reviewer.

Reviewers’ Checklist

The reviewers’ checklist should cover the following areas:

For a reminder of what is included in each of these areas, review the Key Areas of Code Review section from earlier in this lesson.

The reviewers’ checklist is defined during the project initiation, and the whole team should agree on it. It might require changes at a later stage as a project continues and your team evolves.

Tips for Implementing Code Review

Conducting Ethical Code Reviews