Code Review (Code Review)

Source: Internet
Author: User
You read from others Program Code ? I believe many people will experience a very painful experience when reading others' code. Code review is a good prescription to reduce this pain.
1. Code review definition and principles
Programmers regularly explain their source programs to others. This method is adopted by many companies and is considered to be an effective method. Main advantages include:
◎ To explain your programs, programmers will pay more attention to their work progress and code quality.
◎ You can learn from each other and improve together to discover problems in a timely manner.
Programmers can master others' program design ideas and methods to facilitate the maintenance of others' programs
◎ Neutral attitude. In fact, it is required not to be extreme or be involved in too many personal feelings.

2. Code review Operation Process
before performing code review, the presenter will send a notification in advance to inform the relevant personnel of the Code to be reviewed, in this way, participants can take time to get to know the relevant code in advance and take notes for those who do not understand it so that they can ask questions in the code review. When we encounter a tough bug that has no idea or is confusing, we can find a few people or people familiar with the code to review the Code. At this time, the format is relatively casual, you can ask questions on a temporary basis and ask the speaker to answer them. In this process, the speaker may not be able to hear the detailed process very quickly, however, the speaker re-examined the code in this process and may find a solution to the problem. Sometimes there are a lot of code in code review, but a function module can be implemented in a progressive way from the overall to the local. The review time of a code review should not be too long, but can be performed multiple times. In the code review, you will raise questions and suggestions, brainstorm ideas, and come up with multiple people. Some questions you may not think of will be discovered, learned from each other, and made progress together.
it is important to note that when you raise questions, do not confuse your personal feelings, do not deny or criticize others' achievements, and do not evaluate others with your own habits, in this way, the true meaning of code review is lost, which will only make things worse and worse, causing group members to be reluctant to review their own code.
at the same time, the speaker needs to answer others' questions with a serious attitude and explain clearly what may not be described in the review code. Code review is not a one-way process. interaction is a link. Without interaction, you may never know what is wrong with your review code, or even the type of defects in your knowledge.

3. Summary
code review is also a white-box test of the programmer's work achievements. Code review not only promotes programmers to develop excellent and easy-to-understand programs, but also discovers potential bugs, so that every member of the group can have an overall understanding of the program. It also promotes all programmers to use the same programming specification, detect bugs ignored by automatic testing, and promote communication between project members.
in another aspect, code review allows any member of the group to take over other members for further development in a short time, which ensures the progress of the software project and reduces the risks of the software project. The extreme programming software development process involves two-person programming: two programmers sit in front of the same computer, one executes the programming task, and the other performs code review next to it; two programmers exchange their work as appropriate. Although it may be difficult to implement double programming in actual projects. However, as long as we work with this double programming model, the software can belong to the entire development group as a whole. Every programmer can modify any errors and refactor any program, it is not limited to self-developed code.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.