Knot Pair Project Blog

Source: Internet
Author: User

Summary of Pairing programming

Members: Shi Xuan, Lu Huimin

I. Description of the advantages and disadvantages of pairing programming

Advantages: Pair programming experience two people of the spirit of cooperation, but also two people code style and specifications have higher requirements for the future team project made a very good cushion. At the same time, the mode of pairing programming makes the time of debugging bugs much less, and the pass rate of the program is higher. At the same time, compared to the team programming, the pair programming makes two people's interaction more, is advantageous to the efficiency enhancement. In pairing programming, the quality of the program depends on the higher of a pair of programmers because of the review and communication at any time, so the initial quality of the program is much higher, and the time for late modification and testing is greatly reduced. Pairing programming also enables two of people to learn from each other, share knowledge, and improve the programming and interpersonal skills of two people. Because of the need to cooperate, so that two people for their own code style will be more focused.

Cons: Pair programming does not apply to all situations. For the exploratory phase of the project, a person needs a long time in-depth research and independent study; it is not necessary to wait for a long time during the test two people are waiting there to waste time. Late maintenance does not require a high level of technical content, and it can be a waste of time if it is not for two people.

Second, the advantages and disadvantages of each pair of people where

Shi Xuan: Programming experience, Code style good

Write a rigorous program and grasp the details.

Be good at planning time

Writing programs that use a lot of unknown algorithms

Lu Huimin: Lack of programming experience, not enough to grasp the target

Bad code style, insufficient understanding of the algorithm

Be patient, willing to give time, willing to cooperate

Third, information hiding, interface design, loose coupling explain how to use these principles.

Information hiding:

Before designing a software system, you should carefully plan which elements are reusable and then implement them using functions or classes, which is the principle of information hiding. Information concealment is the law used to develop the overall program structure, to conceal or encapsulate the components of each program in a single design module, defining each module as little as possible to expose its internal processing. The principle of information concealment plays an important role in improving the software's modifiable, testability and portability.

Interface Design :

Interface design is a very important aspect, the interface should be as thin as possible, the interface should be as few methods as possible. The principle of interface isolation means that functions are implemented in interfaces rather than classes, and using multiple specialized interfaces is better than using a single total interface.

Loose Coupling :

Usually there is always a dependency between the modules, and the loose coupling is the way to implement the inter-module call through the interface, and reduce the coupling degree between the classes.

Iv. design by contract, Code contract pros and cons, how to fit in your designs

The main purpose of contract design is to hope that programmers can clearly specify a module unit (specific to object-oriented, that is, an instance of a class) when designing a program to what state it should belong to before and after invoking an operation. With the explicit definition of language-level preconditions and invariant, the structure of the program becomes easier to read and communicate.

Knot Pair Project Blog

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.