Basic operations for two-person source code management

Source: Internet
Author: User

We do the project has a specific and variable demand, there are deadlines, quality and resource contradictions, team members of the respective level of the goal is not consistent, natural team can not have no contradiction within. The two cooperation projects have similar stages, namely the embryonic stage-------------------------------stage

In the embryonic period, neither of them understood, mainly through the exchange to receive the other party's acceptance, to avoid conflicts and easy to challenge the point of view; The running-in stage is two people's views, styles and goals in the continuous exchange or even friction to become consistent; the normative stage is after the run-in two people on a lot of things agree, some rules gradually , the stage of creation refers to the two people in the work of harmony, in the project through a profound exchange, burst out of the spark of thought, but not all teams can reach this stage, some teams run too much, may go directly into the "disintegration phase"; the disintegration phase refers to the completion of project development, Or team friction cannot be resolved, the project's team will be disbanded and each individual undertake the next project development study.

In the co-development of two people, there are several aspects of code specification, code review and pair programming that are most important.

Code specifications are divided into Code style specifications and code design specifications. Our code, although the purpose is to call the machine perfect execution, but ultimately to others to see, this time, the code is designed to be clear, easy to understand is the most important. In the two-person cooperative development, we design the code is not only to understand, see the design code, partners should be able to easily understand, can do this code, to be a good code. Code style specifications are primarily textual in terms of indentation, line width, line breaks, parentheses, and {}. The overall requirement is to make the code concise, easy to read, no ambiguity. Code design specification is not only the format problem of program writing, but also involves the programming, the relationship between modules, design patterns and so on. Error handling is also important after you have finished writing the program.

Code review can be self-reviewed, or peer reviewed. However, the efficiency of self-review is not high, this time the two teams of another person will take up this responsibility, and software engineering, the most basic means of review is peer review. The purpose of code review is: 1, find out the error of the code itself, 2, find the logic, the error of the algorithm, 3, the detection of potential errors and regression error, 4, the discovery may need to improve the place, 5, for the whole team to play an educational role.

The best embodiment of the two-man mode of cooperation is the idea of pairing programming. This means that two programmers are analyzing together, designing together, writing test cases and coding together, and finally testing together a report. In pair programming, review and exchange at any time, the program depends on the two programmers in the higher level of that, in this way, the program errors will be much less, the initial quality of the program will be much higher, save a lot of testing, modification time.

Basic operations for two-person source code management

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: info-contact@alibabacloud.com 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.