Extreme Programming (XP)

Source: Internet
Author: User
Extreme Programming (XP) was proposed by Kent Beck in 1996. When Kent Beck worked with Ward cunnheim in the early 1990s s, he had been exploring new software development methods to make software development easier and more effective. Kent carefully observed and analyzed the prerequisites, possible actions, and difficulties for simplifying software development. In March 1996, Kent finally introduced a new idea of software development-XP in a project for DaimlerChrysler.
XP is a lightweight and smart software development method. It is also a very rigorous and thorough method. Its foundation and values are stream interaction, simplicity, feedback, and courage. That is, any software project can be improved from four aspects: strengthen communication, start from simplicity, and seek feedback; be brave in seeking truth from facts. XP is a near-spiral development method, which breaks down complicated development processes into relatively simple small cycles. Through positive communication, feedback, and a series of other methods, developers and customers can clearly understand the development progress, changes, unsolved problems and potential difficulties, and adjust the development process in a timely manner according to the actual situation.

What is software development?

The content of software development is: requirements, design, programming and testing!

Requirement: not only the user requirement, but also all the requirements encountered during development. For example, you first need to know what the project is to solve; what data should be input in the test case ...... to clearly understand these requirements, you often need to communicate with customers, project managers, and so on.

DESIGN: Before coding, you must have a plan to tell you what to do and what the structure is. You must follow this process, otherwise it may be a mess.

Programming: If your program cannot run or meet the customer's requirements on the project deadline, you will not be able to get the money.

Test: The purpose is to let you know when it is finished. If you are smart, you should first write the test so that you can know if you have completed it in time. Otherwise, you often don't know which functions are actually completed, and how far is it from the expected goal.

In software development, customers and developers have their own basic rights and obligations.
Customer:
Define the business priority of each user's needs;
Formulate an overall plan, including the amount of investment used, how long it took, and what the goal was;
Every working week in the project development process can maximize the benefits of investment;
By repeatedly running the function test you specified, You can accurately grasp the project progress;
Ability to change requirements, functions, or priorities at any time, while avoiding expensive re-investment; ability to adjust project plans in a timely manner based on various changes;
The project can be canceled at any time. When the project is canceled, the previous development work is not a pile of garbage, and the functions that have been enabled are required. Ongoing or unfinished work should not be difficult to take over.

Developers:
Know what to do and what to do first;
Work efficiency;
Customers, colleagues, and superiors can answer or help in case of problems or difficulties;
Evaluates the work and reevaluates the work in a timely manner based on changes in the surrounding conditions;
Actively undertake the work, rather than passively accepting the distribution;
40 hours a week, no overtime.

This is software development, and there are other concerns.

Smart lightweight software development methods

A software development method consists of a series of development-related rules, norms, and practices. Heavyweight development methods strictly define many rules, processes, and relevant documentation work. The smart lightweight development method has fewer rules and documents, more flexible processes, and easier implementation.

Before the emergence of software engineering concepts, programmers developed software in their preferred ways. The quality of the program is difficult to control, the debugging program is cumbersome, and it is difficult for programmers to understand the code written by the other party. In 1968, edsger Dijkstra wrote a letter to CACM titled GOTO statement considered harmful, which led to the birth of the concept of software engineering. Programmers began to abandon their previous practices and instead use more systematic and rigorous development methods. In order to make control software development as strict as control of production of other products, many rules and practices have been developed one after another. Many software engineering methods have been invented, and the quality of software has been greatly improved. As there are more problems, the rules and processes become increasingly sophisticated and complex.

Today, in the actual development process, many rules are difficult to follow, many processes are complicated and difficult to understand, and the document production process in many projects is out of control. People try to propose a more comprehensive and better package, or hope for more complex, more powerful auxiliary development tools (CASE tools), but it will always fail, in addition, development specifications and processes become increasingly complex and difficult to implement.

In order to catch up with the schedule, programmers often skip some specified procedures, and few people can fully follow those heavyweight development methods.

The cause of failure is simple. There is no panacea in this world. As a result, some people have proposed to delete, restructure, and optimize the rules and processes in heavyweight development methods, which leads to a lot of lightweight processes that adapt to different needs. In these processes, rules that meet actual needs are retained, and unnecessary complicated development rules are discarded. In addition, compared with traditional development methods, lightweight processes are no longer like a flow production line, but more flexible.

Extreme Programming (XP) is such a smart lightweight software development method.

Why is it called "extreme" (Limit)

"Extreme" (Limit) means that, compared with the traditional project development method, XP emphasizes that every method and idea listed in it is the ultimate and the best. What other XP does not advocate, ignore all (such as the overall design at the early stage of development ). For a project that strictly implements XP, its development process should be stable, efficient, and fast. It can work 40 hours a week without delaying the project progress.

What is XP software development?

1. Extreme work environment

To maximize and fulfill the basic rights and obligations of customers and developers during software development, XP requires that the working environment be the best. Each person who participates in project development will assume a role (Project Manager, project supervisor, etc.) and fulfill relevant rights and obligations. All people work in the same open development environment. It is best for everyone to work in the same big house with refreshments. They do not advocate overtime for 40 hours a week. Every morning, everyone stood up and held a short meeting. There were some large whiteboards on the wall, and all story cards and CRC cards were pasted on them. During the discussion, they could write and draw on them; after work, you can play computer games .......

2. Extreme demand

The customer should be a member of the Project Development Team, rather than separated from the developer, because the customer plays an important role from the Project Plan to the final acceptance. Together with the customer, developers turn various requirements into small demand modules (User story). For example, "calculating the total number of grades means accumulating the number of students in all classes of the grade. "; These modules are combined or broken down into smaller modules based on actual conditions; they are all recorded on small cards (story cards, it is then implemented by programmers in every small cycle (iteration, usually no more than three weeks); the customer determines their priority based on the commercial value of each module; what developers need to do is to determine the development risks of each requirement module. The high risk (usually due to lack of similar experience) requirement modules will be prioritized for research, exploration and development; after developers and customers evaluate each module from different perspectives, they are arranged in different development cycles, and the customer will get a development plan as accurate as possible; the customer specifies an acceptance test (function test) for each requirement module ).

Each time the software is released (after a development cycle), you can get a ready-to-use system that fully meets all the requirements in the corresponding plan. In some traditional development modes, No matter what function, the user must wait until all development is completed.

3. Extreme Design

From the perspective of specific development, the internal process of XP is one by one based on the test driven development cycle, such as planning and design. Each development cycle has many unit tests ). At the beginning, all unit tests failed because nothing was implemented. As small demand modules were completed, more and more unit tests were passed. Through this method, both the customer and the developer can easily check whether the customer has fulfilled its commitment to the customer. XP advocates simple design, which is the simplest way to allow programs written for each simple requirement to pass all relevant unit tests. XP emphasizes abandoning the detailed design package (big design up front), because there is a lot of content you don't need now or recently. XP also strongly advocates review, code review, and refecement and optimization. All these processes are actually optimization design processes; continuous unit tests and functional tests during these processes can ensure that the restructured and optimized system still meets all requirements.

4 eXtreme Programming

Since programming is very important, XP advocates that two people write the same program together (Pair Programming), and the ownership of the Code is attributed to the entire development team (collective code ownership ). Programmers must strictly abide by programming specifications when writing and reorganizing optimization programs. Anyone can modify the sequence written by others. After modification, make sure that the new program can pass the unit test.

5 limit test

Since testing is very important, XP advocates writing unit tests before writing programs. Developers should often integrate the developed modules into one (continuous integration) and run unit tests every time after integration. unit tests should be run for any code review and revision; if a bug is found, you need to add the corresponding test (so the XP method does not need a bug database ). In addition to unit testing, integration testing, function testing, load testing, and system testing are available. All these tests are one of the most important documents in the XP development process and one of the content that is finally delivered to users.

Important conventions and rules in XP

1. Project Development Team)

In XP, everyone who contributes to the project should be a member of the project development team. In addition, at least one person in this group must have a clear understanding of user needs, be able to propose requirements, determine the business value (priority) of each requirement, and adjust the project plan based on changes in requirements. This person assumes the role of "customer". Of course, it is best to be the actual end user, because the entire project is based on the needs of the end user. Programmers are essential members of the project development team. There can be testers in the group who help customers develop acceptance tests; there are analysts who help customers determine their needs; there is usually a coach (coach ), it is responsible for tracking the development progress, solving some problems encountered in the development, and promoting the project. It can also be another project manager, who is responsible for allocating resources and assisting in communication between the project and the outside. There are so many roles in the project team, but it doesn't mean that everyone does the work that others cannot intervene or intervene in. XP encourages everyone to contribute as much as possible to the project. Get along with each other and learn from each other. This is the best XP development group.

2. Planning game, acceptance test, and small-scale release)

The XP development team uses a simple method for project planning and development tracking, and predicts the project progress and determines the future steps. Based on the commercial value of the demand, the development team should conduct a series of development and integration based on the needs of a group. Each development produces a tested and usable system.

3. Extreme Design

From the perspective of specific development, the internal process of XP is one by one test driven development cycle, such as planning and design. Each development cycle has many unit tests ). At the beginning, because nothing was implemented, all unit tests failed. With the completion of a small demand module, more and more unit tests were passed. In this way, both the customer and the developer can easily check whether the customer has fulfilled its commitment to the customer. XP advocates simple design, which is the simplest way to allow programs written for each simple requirement to pass all relevant unit tests. XP emphasizes abandoning the detailed design layout (big design up front), because there is a lot of content that you don't need now or recently. XP also strongly advocates review, code review, and refecement and optimization. All these processes are actually optimization design processes; continuous unit tests and functional tests during these processes can ensure that the restructured and optimized system still meets all requirements.

4 eXtreme Programming

Since programming is very important, XP advocates that two people write the same program together (Pair Programming), and the ownership of the Code is attributed to the entire development team (collective code ownership ). Programmers must strictly abide by programming specifications when writing programs and re-tuning optimization programs. Anyone can modify the program written by others. After modification, make sure that the new program can pass the unit test.

5 limit test

Since testing is important, XP advocates writing unit tests before writing programs. Developers should often integrate developed modules into one (continuous integration), and run unit tests each time after integration; unit tests should be run for any code review and modification; when a bug is detected, you need to add relevant tests (so the XP method does not require a bug database ). In addition to unit testing, integration testing, function testing, load testing, and system testing are available. All these tests are one of the most important documents in the XP development process and one of the content that is finally delivered to users.

Important conventions and rules in XP

1. Project Development Team)

In XP, everyone who contributes to the project should be a member of the project development team. In addition, at least one person in this group must have a clear understanding of user needs, be able to propose requirements, determine the business value (priority) of each requirement, and adjust the project plan based on changes in requirements. This person assumes the role of "customer". Of course, it is best to be the actual end user, because the entire project is based on the needs of the end user. Programmers are essential members of the project development team. There can be testers in the group who help customers develop acceptance tests; there are analysts who help customers determine their needs; there is usually a coach (coach ), it is responsible for tracking the development progress, solving some problems encountered in the development, and promoting the project. It can also be another project manager, who is responsible for allocating resources and assisting in communication between the project and the outside. There are so many roles in the project team, but it doesn't mean that everyone does the work that others cannot intervene or intervene in. XP encourages everyone to contribute as much as possible to the project. Get along with each other and learn from each other. This is the best XP development group.

2. Planning game, acceptance test, and small-scale release)

The XP development team uses a simple method for project planning and development tracking, and predicts the project progress and determines the future steps. Based on the commercial value of the demand, the development team should conduct a series of development and integration based on the needs of a group. Each development produces a tested and usable system.

Planned project

XP's planning process mainly targets two problems in software development: How much work can be done before the delivery date; what to do now and next. Continuously answering these two questions is to directly serve the implementation and adjustment of the development process. In contrast, it takes half the effort to precisely define what to do in the entire development process and how much time each task will take. To address these two problems, XP has two major processes:

Software release plan ). The customer elaborated on the requirements and the developers estimated the development costs and risks. The customer develops a general project plan based on development costs, risks, and the importance of each requirement. The initial project plan is neither necessary nor possible, because the development costs, risks, and importance of each requirement are not static. Moreover, this plan will be constantly adjusted to be more accurate during implementation.

Iteration Planning ). During the development process, there should be many stages (for example, every three Monday ). Developers may perform internal restructuring and optimization (code and Design) on the system at a certain cycle, while new functions are added at a certain cycle, you can also perform two tasks at the same time in one cycle. However, after each development cycle, you should be able to get a system that has implemented some functions. In addition, each time the customer goes through a cycle, the customer will come up with the need to determine the completion of the next cycle. In each development cycle, developers break down requirements into small tasks and estimate the development costs and risks of each task. These estimates are based on actual development experience. If the project is done too much, the estimates are naturally more accurate and accurate. In the same project, every time a development cycle occurs, the next estimation will have more experience, reference and basis, so as to be more accurate. These simple steps provide rich and sufficient information for the customer to flexibly and effectively control the development process. Every two or three weeks, the customer will be able to see what the developers have done. In XP, there is no vague saying: "It's almost finished" or "It's finished 90%". If it's not done, it's not done. This approach seems to have advantages and disadvantages: The advantage is that the customer can immediately know what has been done, whether the made things are used together, and what needs to be done or improved; the disadvantage is that the customer may be dissatisfied or even suspend the contract when they see what they have done. In fact, this practice of XP aims to discover and solve problems as soon as possible, instead of waiting for a few months until the user finally sees the developed system, then I will tell you that this is not feasible, that has changed, and that it has to be increased.
Which content.

Acceptance Test

The customer defines acceptance tests for each requirement. Through the acceptance test, developers and customers can know whether the developed software meets the requirements. XP developers regard these acceptance tests as important as unit tests. To avoid wasting valuable time, it is best to automate these testing processes.

Small releases)

The requirements of Iteration Development are what users need most. In XP, users should be able to easily evaluate the systems that are released at the completion of each cycle, or have been able to put into practical use. In this way, software development is no longer invisible to customers, but tangible. XP requires frequent software release. If possible, a new version should be released every day, and a new version should be released immediately after any change, integration, or new requirement is completed. The consistency and reliability of these versions are ensured by acceptance testing and test-driven development.

3 simple design, Pair programming, test-driven development, reorganization and Optimization

XP programmers not only work together as a development group, but also write the same program for a small Development Unit. Developers perform simple design, write unit tests, and then write code that meets the test requirements, and continuously optimize the design while meeting the requirements.

Simple Design

This is what puzzles beginners most in XP. XP requires the simplest way to achieve each small requirement, provided that the software developed based on these simple designs must pass the test. These designs can only meet the current needs of the system and customers, without any superfluous design, all these designs will be continuously reorganized and optimized in the subsequent development process.

In XP, there is no general design that is one-time in the traditional development mode for all requirements. In XP, the design process almost always runs through the entire project development: from developing a project plan, to developing an iteration plan for each development cycle, to a simple design for each requirement module, to design review and continuous design reorganization and optimization. The whole design process is a spiral, continuous development process. From this perspective, XP is designed to the extreme.

 

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.