官术网_书友最值得收藏!

Code Review – Process and Importance

The primary motivation behind any code review is to improve the overall quality of the code. Code quality is very important. This almost goes without saying, especially if your code is part of a team project or is accessible to others, such as open source developers and customers through escrow agreements.

If every developer was free to code as they pleased, you would end up with the same kind of code written in so many different ways, and ultimately the code would become an unwieldy mess. That is why it is important to have a coding standards policy that outlines the company's coding practices and code review procedures that are to be followed.

When code reviews are carried out, colleagues will review the code of other colleagues. Colleagues will understand that it is only human to make mistakes. They will check the code for mistakes, coding that breaks the company's code of coding conduct, and any code that, while syntactically correct, can be improved upon to either make it more readable, more maintainable, or more performant.

Therefore, in this chapter, we will cover the following topics to understand the code review process in detail:

  • Preparing code for review
  • Leading a code review
  • Knowing what to review
  • Knowing when to send code for review
  • Providing and responding to review feedback
Please note that for the Preparing code for review and Knowing when to send code for review sections, we will be talking from the point of view of the programmer. For the Leading a code review and Knowing what to reviewsections, we will be talking from the point of view of the code reviewer. However, as regards the Providing and responding to review feedback section, we will cover the viewpoints of both the programmer and the code reviewer.

The learning objectives for this chapter are for you to be able to do the following:

  • Understand code reviews and why they are good
  • Partake in code reviews
  • Provide constructive criticism
  • Respond positively to constructive criticism

Before we dive deep into these topics, let's understand the general code review process.

主站蜘蛛池模板: 延边| 嫩江县| 南陵县| 西充县| 台江县| 衡南县| 新邵县| 达拉特旗| 湄潭县| 安溪县| 克东县| 和田市| 洞口县| 望都县| 类乌齐县| 荆门市| 前郭尔| 会昌县| 冕宁县| 永丰县| 临沧市| 永定县| 和林格尔县| 开平市| 甘南县| 孟津县| 思南县| 镇远县| 富平县| 呈贡县| 江华| 双柏县| 新安县| 五大连池市| 扶绥县| 谢通门县| 桐梓县| 灌阳县| 吉隆县| 芦山县| 郓城县|