Live XP: (7) actual battle

xiaoxiao2021-03-06  101

Live XP: (7) actual battle

Lin Xing (reprinted from www-900.ibm.com) October 27, 2003

The fundamental idea of ​​programming is to improve the quality of communication inside the development team. In actual conditions, different development teams face different communication problems. So how do you find a common guidance idea, how should you adjust according to the actual situation? Cost weighing and strategy selection

From the discussion of the previous article, we can understand that due to the factors, ideal changing programming often has a lot of resistance. At this time, we can adjust according to the actual situation, choose different ways. But how do we evaluate the cost of these ways? There is a problem in the modification of design knots, test knots, review, and the like: It seems that they seem to have achieved the effects of the pair, and saves costs. But in fact, this cost is not saved, but it is transferred.

In the project, in order to give the junction, it is easier to accept for programming, and we use a variant practice, and when designing and reviewing, the code is responsible for a single developer. A and B have two hours of design discussions for a requirement, and then be responsible for encoding by b. However, b was found in the case where the original design was found, and he decided to make some modifications to the design. At this time, he wants to notify A, but at this time A is not, then B is adjusted according to his own ideas, and Complete the implementation. At the time of review, B had to spend a period of time to explain the reasons and details of design changes.

Note that during this process, the time A and B saving the encoding of the encoding, it is actually transferred to the review. Of course, the time spent on review may be much shorter than the coded time. But we must also see that if there is a defect in the design, A and B still need to spend a certain amount of time to improve design and implementation, this situation is also a big possibility.

The discussion of the cost of the programming is not the next conclusion. This cost is uncertain for different organizations. For some organizations, the ideal pairing programming may be very suitable, but it is not necessarily for other organizations. The focus is that a method must be found so that the communication skills between the team are enhanced.

The standard when the different teams perform in a way design is only one, which is how to improve communication quality. Different teams have different communication problems. Find this communication problem can we be able to medicate medicines. There is such a software organization, and he implements the idea of ​​programming is very simple, it is to reduce the impact of the mobile phone. After study, we have found that this organization has such a feature: the product has experienced the evolution of several generations, the structure is complicated; developers understand only the modules that you are responsible, very small, and have a fixed customer base, customers There is often a need for modification; any developer's loss means that the module he is responsible is unmanned for a while; the cost of increasing a developer is acceptable relative to the embarrassment of the module. In such a case, the organization requires any module must have two developers responsible. In fact, after this approach, the personnel did not double, because the work of maintaining old products and developing new products is parallel, but also the same developer is not only responsible for one module. Although the personnel have increased, the customer's satisfaction is improved, and the development force is also enhanced, and this result is still satisfactory. It can be seen that in this example, the pairing method is not a pair program described in XP, which is just an organizational form, but in solving communication problems, the idea of ​​both is similar. Similarly, if we want to apply a knot in your own organization, it is less than the work of the communication bottleneck of your organization. Design

The meaning of the design is that the design of a certain module is completed, and the design here is not a large-scale software design (for large-scale pre-design, we prefer to let the team design, please refer to agile architecture design), Instead, it is designed before the code, this design is characterized by a short time (only a few hours or dozens of minutes), but it is very important for the quality of the entire code, because we need Guaranteed the principle of designing the architecture, as well as design flexibility, consistency, etc., also need to ensure the performance and speed of the design. After a feature is completed and entered the encoding, this part of this characteristic has been determined. Therefore, this small scale design is often a more important fine point in software development. Configure double in design and can effectively improve code quality. This pairing idea is on critical components, but the specific performance of small-scale design is often two people 's views of a problem. He does not reflect in the form of code or model, The constraints of the non-coder are relatively small, and the code implementation is likely to be inserted and designed, so that non-implementing is difficult to obtain this knowledge. In this way, if used alone, it is easy to evolve into a form, and the effect is not very good. Therefore, we need other cooperation. Test

The test knot here is tested to the special finger unit. The basic idea of ​​champion is that the A and B have agreed to the class profile (class structure and public method), and a written test code, b writing code to meet the test. If B is incorrect for the design understanding, the code must not be tested, if the understanding of the design is incorrect, B must notify A Rewind test. If the change of XP's unit test is very familiar, it will have a good effect in this way. First, the test code itself is a small scale design, and it reflects in a specified coding. As long as the test code is excellent enough, it can capture a lot of design defects. Second, this way is a variant of a limited test, but its effect is superior to a single person's test priority. Because a person thinks about testing and design, it is difficult to consider, if two people consider, tests often find more problems or defects. When you start using this method, you may be a bit not habit, but it will be more smooth after you are familiar. The review knot on the design pair and test knots are paired before the coding activity begins. However, the review is done after the encoding activity is completed. A After b Completing the code, you need to review the code. The contents of the review include whether the code reflects the intention of the design. Is there a defect in the code, whether the code meets the demand, whether the code meets the principle of consistency. Generally, this review belongs to the same level review. Of course, based on the organizational style discussed below, you can guide experienced programmers to guide unreportable programmers. The maximum meaning of the review on the software process is that it has formed a continuous review system that retains the advantages of the review system, and can overcome the disadvantages of the review system. For example, it takes time, and is blindly rejected by the developer.

The two ways of these ways can be implemented separately or can be implemented. Although these three ways are not complete in programming practices, they get as much as possible to the programming benefits, and the cost is relatively low. If you have started to implement a pair programming or there is no sufficient resource adopting a pair programming, the above variation is used. Commonly programmed organizational style

The pairing program is not catching. Members' organizations need certain skills. Basic operation ideas are, first identify the key issue of communication, and then start, organize personnel. For example, for a project, participating developers have less experience, developers are unfamiliar with the development model of the organization, and are also unfamiliar with the development of the target. The main tasks are pressed on the experienced senior programmer. In order to solve this problem, in several iterations of the project, it is enforced the pairing system. The basic idea of ​​pairing is a newbie, the pairing realization is the old hands to write unit test, require novice implementation, and joint code review (ie Use test knots and review patches to two ways). After completing a small module, the older needs to replace his partner to ensure that the newbie can make more independent development work when the first two iterations are completed. The progress is very unsatisfactory. The old hands also have varying degrees of complaints, think this is in delays. However, the senior management personnel listened to the report of the project, expressed support for this approach. After all the newcomers are mixed with the old hands, the situation has changed very much. The development speed of the system is significantly accelerated. The atmosphere of close communication is formed, and the veterans can make more complex design and quality control, and more surprisingly, there are already two newcomers to get close to the veteran, This means that the next round of pairing programming process, they will play the role of the older. This example tells us:

Implementation of important communication issues to programmatically solve a problem with a problem with programming is an excellent practice designed for communication issues and environmental characteristics. It must be insisted that it can have effect. This is a very typical organizational style, which can be applied to a lot of software. project. It fully reflects the importance of communication. More organizational styles also include: Training projects. Sometimes this project is also known as a gribbezable project, the biggest goal of the project is to study and test certain techniques to promote the technology within the software organization. In this project, knowledge exploration and research tend to be more important than cost, so it can be used in the form of a programming. QC. During software development, there is often a core part of the design. This part of the design is either related to the overall structure of the software, or it means the most concerned demand for customers. This part of the software design is good, will directly affect customer thinking about software. Therefore, this part of the design is worthy of double development power. In many projects, we have found that many developers don't realize this. For developers, they may just have some negligible mistakes, but these mistakes sometimes allow customers to leave a very bad impact. Therefore, identify important parts in the software and invest more development power, often enable the final software quality. Relocation system. Studies have shown that even better tissue doing the knowledge management, there is still a lot of knowledge to be stored in the human brain. In order not to form an information from one by islands, the best information flow is to communicate. Turning system, or Cross Training, is designed to solve this problem. Another problem solved by the root system is that it is not a busy person who has neither a busy group. This is a problem that manages important solutions, and the round government can solve it very well.

转载请注明原文地址:https://www.9cbs.com/read-98675.html

New Post(0)