Some insights into pairing programming

Source: Internet
Author: User

the first small job in soft work is two-pair programming, and using JavaScript to develop a game of life web games, the game logic is not complicated: in an infinitely stretched grid, each grid lives a random cell in the inventory state, under certain rules, The life and death of a cell in the next generation depends on the number of cells around it. Unlike previous personal programming or team development, from programming to testing to Final document writing, it is done by pairing pairs. Through the practice of work, the pair programming has more feelings.

  In our development process, the two people assume the role of the driver and the pilot, the "driver" responsible for the specific coding work, "Navigator" is responsible for the inspection, timely correct the problem in the code. In the absence of pairing programming practice, my feeling is that this kind of programming is very awkward, there is a person around me staring at me will be very unaccustomed, it may also reduce efficiency. But after the two of us have programmed it, we'll find it a whole new experience.

Pairing programming differs from the traditional way

Take seriously

I think that the most obvious difference between pair programming and personal programming is the psychological difference. Because pair programming is a two person thing, whether it is the role of the driver or the pilot, need to design and implementation of sufficient preparation, otherwise it is easy to become a person to write code, the other people do nothing. Taking my experience as an example, before the development, I mentioned the previous day before I wrote the JS code read again, in order to be able to fully grasp the JS of some basic grammar and writing specifications, while writing a small dynamic Web page, in order to be proficient in the use of Web development HTML, CSS and JS. Before the development, I carefully think about the implementation method, to be confident. Because it is done by two people, there is a side of the other person's performance, so even more stringent requirements for themselves than usual.

Development process, to play more than spirit, two people close cooperation, who also embarrassed desertion, can focus on the code.

Increase efficiency

The form of pairing programming allows code to be kept under review, each piece of code written by one person, and another checked to minimize the likelihood of a bug being exchanged, to discuss ways of achieving it, and to be able to complement each other when confronted with problems. For example, I may have forgotten that JS randomly generates 0 or 1 of the way, and the other is clear, which reduces the time to search and improves efficiency.

In the testing process, because there are two people debugging together, so you can quickly find the problem. For example, after the completion of the code, open the page, found that the page does not show anything, press the F12 key to view, and no error, then I am ready to open the source code, step by step debugging. But after I debug a few, Yue Hin has found the problem, the original game interface has been written, not called. In addition, the program is running smoothly.

Learn from each other

Pairing programming is also a process of learning from each other. In the pair programming process, the two people will continue to implement methods, code style or naming methods, etc., two people's ideas can be complementary, in the process of writing to learn the other side of the problem-solving ideas and methods, to improve their own problem-solving and programming ability has a great help.

Some insights into pairing programming

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.