Extreme Programming ForumWhat is Extreme Programming (2)

xiaoxiao2021-03-06  107

Important practices and rules in XP

1 Project Development Group (Team)

In XP, each person who contributes to the project should be one member in the project development team. Moreover, there must be at least one person in this group.

It is very clear to user demand, can propose requirements, determine the business value (priority) of each requirement, according to changes in demand, etc.

Plastic plan. This person plays the "customer" role, of course, is the actual end user, because the entire project is around

The end user needs to be expanded. Programmers are an indispensable member in the project development team. There can be testers in the group, they help

Customer formulate acceptance tests; there are analysts to help customers determine demand; usually there is a Coach (coach), responsible for tracking development progress,

Solve some of the issues encountered in development, promote the project; you can also still have another project manager, responsible for the distribution of resources, assisting projects inside and outside

Communication communication, etc. There are so many roles in the project team, but it is not to say that everyone doing is that others can't intervene or intervene, XP

Encourage everyone to contribute more to the project as much as possible. Equality, take the length of the best; this is the best XP development team.

2 Planning Game, acceptance test, small scale release (Small Releases)

The XP Development Team uses a simple way to conduct project plans and development tracking, and predict the progress of the project and the steps to determine the future. root

According to the business value of the demand, the development team conducts a series of development and integration for a group of needs, and each development will produce a pass.

The system you can use can be used.

• Plan project

The planning process of XP is mainly for two issues in software development: how much work can be completed before delivery date; now and next

Do something. Constant answer these two questions, just serve how to implement and adjust the development process; Hope to start with this

It is half a time to exactly define what is going to do for the entire development process and how much time is spent. For these two questions, XP

There are two main corresponding processes:

Software Publish Plan (Release Planning). Customers describe demand, developers estimate development costs and risks. The customer is based on development

The importance of this, risks and every demand is developed a rough project plan. The initial project plan is not necessary (nor possibly)

Often accurate, because the development cost of each requirement, risk and its importance are not unchanged. Moreover, this plan will implement the process

It is constantly adjusted to be accurate.

Cycle Development Planning. During the development process, there should be many phases (such as every three Monday

Draw). Developers may perform internal reforming and optimization (code and design) in a certain cycle, and add new in a certain cycle.

Features, or will do two works simultaneously in one cycle. However, after each development cycle, users should get one

Some functions have been achieved. Moreover, each time a cycle, the customer will reproduce the need to determine the next cycle to be completed. in

During each development cycle, developers will break demand into a small task and then estimate the development cost and risk of each task.

These estimates are based on actual development experience, the project is much done, and the estimation is naturally more accurate and accurate; in the same project, every pass

A development cycle, the next estimation will have more experience, reference and basis, making it more accurate.

These simple steps provide customers with rich, sufficient information, making it flexibly and effectively regulates development processes. Two three stars

During the period, customers can always see the needs of developers have completed. In XP, there is no "fast to complete", "completed 90%" blur, or if it is done, or if it is not completed. This kind of practice seems to be favored: the benefit is customer

I know what to do, what I have made, what else to do or improve, what is wrong?

The things that can come out may be very unsatisfactory or even stop contracts. In fact, this practice of XP is to find problems early, solve problems,

Instead of waiting for a few months, the user finally saw the developed system, and then told you that this is not, that change, but also increase

Which content, etc.

• Acceptance Test

Customers define some acceptance tests for each requirement. By running an acceptance test, developers and customers can know the developed software

does it reach the requirement. XP developers are as important as those of these acceptance tests and unit testing. In order not to waste valuable time, it is best to

Automate these test processes.

• Frequent small scale release software (SMALL Releases)

The need for each cycle is the most needed for users. In XP, the system is released for each cycle

User should be able to evaluate it easily, or it is already enabled. In this way, software development for customers,

It is no longer a thing that can't touch it, but it is real. XP requires frequent release software, if possible, it should be released every day

A new version; and after completing any changes, integration, or new needs, you should immediately release a new version. These versions

Consistency and reliability are guaranteed by the development of acceptance testing and test drive.

3 Simple design, Pair Programming, test drive development, reforming and optimization

The XP programmer is not only working together as a development team, but also writes the same program with two people for a small development unit. Developers

Simple design, write a unit test, write code that meets the test requirements, and constantly optimize the settings under the premise of meeting the demand

meter.

• Simple design

This is the most confused in XP. XP requires the easiest way to achieve each small demand, provided in accordance with these simple settings

The software developed must pass the test. These designs can only meet the needs of systems and customers in the current demand, do not need any

The design of the snake has been designed, and all of these designs will be continuously reorganized and optimized during subsequent development.

In XP, there is no one-time in traditional development model, and the overall design of all needs. In XP, the design process is almost always

Wearing the entire project development: From the plan to develop a project, to develop a plan for each development cycle, to each need

The shortcut design of the module, to the design review, and the uninterrupted design reorganization and optimization. The entire design process is a spiral, no

Broken process and development process. From this perspective, XP is the ultimate of the design.

PAIR Programming

In XP, all the code is written by two programmers on the same machine - this is the most controversial in XP, and it is also true.

A little bit. This guarantees all the code, design, and unit tests to review, code, design, and test quality due to another person.

This is improved. It seems that it is a waste of human resources, but various studies have shown that the fact is exactly the opposite. - this way of work

Greatly improved working strength and work efficiency.

Many programmers have been forced to try this (XP also requires support for administrative orders). Always not get used to start, and two people

The efficiency is not higher than the efficiency of one person. The effect of this approach is often necessary to stick to a few weeks or two months before it can be significant. Dependent

In all the programmers who have just started Pair Programming, 90% of people think that this work is more efficient after two months.

In project development, each person will continue to replace partners programming. Therefore, Pair programming not only improves software quality, but also

Enhanced knowledge exchanges and updates, enhanced communication and understanding of each other. This is not only good for individuals, but also benefits the whole

Project, development team and company. From this point of view, Pair Programming is not only for XP, but also for all other software development.

method.

• Test driver development

Feedback is one of the four basic values ​​of XP - in software development, full feedback can only be obtained by sufficient testing. XP

Subprising tests can be seen in other software development methods, such as functional testing, unit testing, system testing and load testing, etc .;

Different, XP combines testing into its unique spiral incremental development process, the test continues to accumulate with the progress of the project.

In addition, since the entire development team has code, the test is also maintained by everyone. That is, anyone is putting a program in the Code Base

Before Check IN, all tests should be running; if anyone finds a bug, it should be added to this bug immediately.

A test, not waiting for someone who wrote that program to complete; anyone picking up another person's task, or modifying other people's code and setting

After the change, it will prove that his work has not been destroyed by all tests. In this way, the test can truly help

Get feedback, and, the test should be basically covered by all customer and development needs by constantly prioritizing and accumulating.

Therefore developers and customers can get as sufficient feedback as possible.

• Reforming and optimization (Refactoring)

XP emphasizes a simple design, but simple design is not a designed water-based program, nor does it have no structure, lack of reuse

programming. Although developers are simple designed for each USER Story, it is also constantly improving design.

The process is called the design of the reforming and optimization. This name first appeared in Martin Fowler "Refactoring:

Improving The Design of EXISTING CODE "this book.

Refactoring is mainly working to reduce the reuse of the procedures and reuse in the program and design, enhance the reusability of procedures, and design. Refactoring

The concept is not XP first, it has been proposed for nearly 30 years, and it is always considered to be one of the characteristics of high quality code. But XP

Emphasize that the refactoring is extremely, and should be used anytime, anywhere, as long as it is possible, the programmer is not

It should be distressed in the previously written procedure, but it is necessary to improve the procedure without lie. Of course, after each change, the programmer should run the test program.

Guarantee the new system still meets the predetermined requirements.

4 frequent integration, collective ownership, programming specification

The XP Development Team often integrates different modules. In order to improve software quality, in addition to test drive development and pair programing, XP

Require each person's code to comply with programming specification, and anyone can modify the code written by other people, and everyone should take the initiative to check

Code written by other people.

• Frequent integration (Integration)

In many projects, developers tend to integrate each module very late. In these projects, developers often discover a lot of problems during the integration process, but cannot affirm that the procedures are issued; and only after the integration is completed, the developers began to be slightly

Use the entire system, then deliver it immediately to the customer acceptance. For customers, even if these systems can pass the test test, because

Short use, there is not much grasp of the customer's heart.

In order to solve these problems, XP proposes that the entire project should be frequent, and the USER Story has been developed as much as possible.

(A new User Story each time). Each integration must run the corresponding unit testing and acceptance test to ensure that the customer is in line with the customer and

Development requirements. After the integration, a new application system is issued. In this way, during the development of the entire project, almost every two days, will

Publish a new system, sometimes even release several versions one day. Through this process, customers can understand that they have completed very clearly.

Features and development progress, and based on these conditions and developers to communicate in time to ensure that the project is successfully completed.

• Collective code Ownership, Collective Code Ownership

During many project development, developers only maintain their own code, and many people don't like other people to modify their own code.

Therefore, even if there may be a corresponding comparison development document, a programmer is very small, and it is not willing to read other programmers.

Code; and, because unclear what other people have achieved, a programmer does not dare to change the generation of others.

code. At the same time, because it is your own code, some problems can not be used because of the limitations of time tension or technical level.

Discover or get a better solution. In response to this point, XP advocates everyone to share the code, everyone has the right and obligations to read other generations.

Code, discovery, and correct errors, reforming, and optimizing code. In this way, these code is not just one or two people, but is opened by the entire project.

If the team is completed, the error will be reduced, and the reuse will be improved as much as possible, and the quality of code is very good.

In order to prevent the code from modifying other people from causing the system crash, each person should run the test program after modification. (From this point, we can

It is once again, and the various practices and rules of XP are organically combined. )

• Programming specification

Everyone in the XP Development Team follows a unified programming standard, so all the code seems to be written by one person. because

With a unified programming specification, each programmer is easier to read the code written by other people, this is to implement Collective Code

One of the important premise of Ownership.

5 metaphor (system metaphor), not overtime

The XP process allows everyone to have a common, concise understanding of the system by using some image metaphors. XP believes that overtime is abnormal, because

For this, there is a problem with the estimate of the project progress.

• Metaphor (system metaphor)

In order to help everyone unanimously understand the customer needs to complete, the system function to be developed, the XP development team uses a lot of image metaphors

To describe how the system or function module works. For example, for a search engine, its metaphor may be "a large group of gaps

Spider, look for things to capture on the Internet, then bring things back to the nest. "

• Do not work overtime

A large number of overtime means that the original plan is inaccurate, or the program is far from knowing what work can be done. and

Moreover, development managers and customers can therefore be unable to grasp the development speed; developers are therefore very tired. XP believes that if there is a large number of overtime phenomena, development managers (such as Coach) should be able to determine overtime with customers, and adjust the project gauge in time.

Plan, progress and resources.

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

New Post(0)