What is extreme programming

xiaoxiao2021-03-06  99

Extreme Programming (Extreme Programming, Abbreviation XP) is proposed by Kent Beck in 1996. Kent Beck in the early 1990s

When you have worked with Ward Cunningham, you have always explored new software development methods. I hope that software development is simpler.

effect. Kent carefully observes and analyzes the prerequisites, possibilities and difficulties of simplified software development. March 1996,

Kent finally introduced new software development concepts in a project made for Daimlerchrysler.

XP is a lightweight, smart software development method; it is also a very strict and careful way. Its foundation and values

It is communication, simple, feedback and courage; that is, any software project can be improved from four aspects: strengthen communication;

Single; seek feedback; courage to seek truth from facts. XP is an near-spiral development method that decomposes complex development process into one by one.

Relatively simple small cycle; developers and customers can be very clear through active communication, feedback, and other series of methods, developers and customers can be very clear

Develop progress, changes, problems and potential difficulties to be solved, etc., and adjust the development process in time according to the actual situation.

What is software development

Software development is: demand, design, programming, and test!

Demand: Not only is user needs, it should be all the needs encountered in the development. For example, you first have to know that this project is for understanding

What is the problem? What should I enter in the test case ... In order to clearly know these needs, you often want to be with our customers, project managers.

Wait for communication.

Design: Before the encoding, there must be a plan to tell you what to do, how the structure is equal. You must do it according to this, otherwise it may

A mess.

Programming: If you are on the project's deadline, your program can't run or don't reach the customer's request, you can't get money.

Test: The purpose is to let you know, when it is completed. If you are smart, you should write test first, so you can know you in time.

Whether it is really done. Otherwise, you often don't know, what functions have been true to do, how far is it left from expected.

In software development, customers and developers have their own basic rights and obligations.

client:

• Define business priorities for each user's needs;

• Develop an overall plan, including how much investment, how long it takes, what is the purpose of achieving

• Each working week during the project development will make your investment to get the biggest benefit;

• Accurately master the project progress by repeatedly running the function test you specify;

• You can change your needs, functionality, or priority at any time while avoiding expensive reinvestment; can adjust the project plan in a variety of changes;

• Can be canceled at any time; when the project is canceled, the previous development work is not a bunch of garbage, and the function has been developed.

Work on or unfinished should be not difficult to take over.

Developer:

• I know what to do, and what to do;

• Work efficient;

• When there is a problem or difficult, you can get the answer or help from customers, colleagues, superiors;

• Evaluate work and re-evaluate according to changes in the surrounding situation;

• Actively bear your work, not negative acceptance assignments;

• Working system for 40 hours a week, do not work overtime.

This is software development, in addition to this, there are other problems that should be concerned!

Smart lightweight software development method

A software development method is a series of regulations, norms, and practices related to development. The development method of heavyweight is strictly defined by many regulations.

The processes and related documents are working. Smart lightweight development methods, the rules and documents are relatively small, the process is more flexible, and it is relatively easy to implement.

Programmers develop software in the way they like in software engineering concepts. The quality of the program is difficult to control, the debugger is very

It is also difficult to read the code written by the other party between programmers. In 1968, Edsger Dijkstra wrote a topic for cacm.

STATEMENT CONSIDERED HARMFUL's letter, the concept of software engineering is born. The programmers began to abandon the previous practice.

Use more systematic and stricter development methods. In order to develop and control other products as strict, people have been developed

Many rules and practices have invented a lot of software engineering methods, and software quality has been greatly improved. With more problems encountered,

Rules and processes are getting finer and complex.

Today, in the actual development process, many rules have been difficult to follow, many processes are complicated and difficult to understand, many projects

The production process is losing control. People try to make more comprehensive and better package, or hopes more complex, more powerful

Case Tools, but always can't succeed, and development specifications and processes become more complex and difficult to implement.

In order to catch progress, programmers often skip some specified processes, and few people can comply with those heavyweight development methods.

The reason for failure is very simple, and there is no universal medicine in this world. Therefore, some people put forward, carry out rules and processes in heavyweight development methods

Delete, reorganize, and optimize, which has produced a lot of lightweight processes that adapt to different needs. In these processes, the actual needs

The rule is retained, and unnecessary complicated regulations are abandoned. Moreover, compared with traditional development methods, lightweight processes are no longer like flow

Water production line, but more flexible.

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

Why is it called "extreme" (limit)

"Extreme" means that contrast the traditional project development method, XP emphasizes the limit of each method and idea it listed.

It is best to do it; other XPs are not advocated, then ignore (such as the overall design of the previous period). A project that strictly implements XP,

The development process should be smooth, efficient and fast, can do a 40-hour work system for a week without delay project progress.

What is XP software development?

1 limit work environment

In order to maximize the basic rights and obligations of customers and developers in software development, XP requires the working environment

Do the best. Everyone who participates in project development will be a role (project manager, project supervisor, etc.) and fulfill the rights

And obligations. All people work in the same open development environment, it is best to work in the same big house, and refreshments

Supply; 40 hours a week, do not advocate overtime; every morning, everyone stands with a short meeting; there are some big whiteboard on the wall, all

The Story Card, the CRC card, etc., you can write paintings above when discussing problems; you can play computer travel together after get off work.

play…….

2 extreme demand

Customers should be one member of the project development team, rather than separated by developers; because of the project's plan to final acceptance, customers

It is very important to play straight. Developers with customers, turn various demands into a small demand module (User Story), example

Such as "The total number of calculation grades is to put the number of all classes of this grade." These modules will be combined together according to the actual situation or decomposed into smaller modules; they are recorded in some small cards (Story On the Card, the programmers were respectively

Small cycle development (Iteration, usually no more than 3 weeks); customers specify them according to the business value of each module

The priority; developers must do is to determine the development risk of each demand module, high risk (usually because of lack of similar experience)

The demand module will be prioritized, explore and develop; after developers and customers evaluate each module from different angles, they are

Arranged in different development cycles, customers will get as accurate development plans as possible; customers specify an acceptance test for each demand module

(function test).

Every time you release a developed software (after a development cycle), users can get a system that can start using, this system is comprehensive

Really realized all the needs of the plan. In some traditional development modes, no matter what function, users have to wait until all developments

Be will start using it.

3 extreme design

From a specific development perspective, the process of the inner layer of the XP is a Test Driven Development week based on test drive.

The processes such as plans and design are all deployed. There are many corresponding unit tests for each development cycle.

Unit test. Just start, because everything is not implemented, all unit tests have failed; with a small need

The completion of the module, and more and more unit tests are passed. In this way, customers and developers are easy to test, whether to perform

The commitment to the customer. XP promotes Simple Design, which use the easiest way to make each simple

The program written out can be tested through all related units. XP emphasizes to abandon the detailed design of the package (BIG

Design Up Front, because there are many contents in this design that you are now or recently. XP also strongly advocates design

Review, code review, reforming and optimization, all these processes are actually optimized

Cheng; constantly run unit testing and functional testing during these processes, ensuring that the reforming and optimization system still meets all the needs

begging.

4 limit programming

Since programming is very important, XP advocates two people to write the same program (pair programming, and the code ownership is attributed to the whole

Collective Code Ownership. The programmer must strictly abide by writing the program and reorganization optimization.

Programming specification. Anyone can modify the procedures written by other people, and then determine the new program through unit test.

5 limit test

Since the test is very important, XP advocates writing unit test before starting writing the program. Developers should always integrate development of well-developed modules to

To run together, you must run unit test after each integration; do any code review and modification

Row unit testing; found BUG, ​​add the corresponding test (so the XP method does not require a bug database). In addition to unit testing,

There are also integrated testing, functional testing, load testing and system testing. All of these tests are one of the most important documents in the XP development process, and is also one of the contents of the ultimate delivery to the user.

Important practices and rules 1 Project Development Group (Team) in XP, people who contribute to the project should be one of the project development team. Moreover, at least one of the groups must be very clear to user needs, can make demand, determine the business value (priority) of each requirement, adjust the project, etc. This person plays the "customer" role, of course, is the actual end user, because the entire project is expanded around the demand of end users. Programmers are an indispensable member in the project development team. There can be testers in the group, they help customers develop acceptance tests; there are analysts to help customers determine demand; there is often a Coach (coach), responsible for tracking development progress, solving some problems encountered in development, and promoting projects; It is also possible to further project managers, responsible for distributing resources, assisting exchange communication inside and outside the project. There are so many roles in the project team, but it is not to say that everyone doing is that others cannot intervene or intervene, and XP encourages 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 Releases The XP Development Team uses a simple way to conduct project planning and development tracking, and predict the progress of the project and the steps to determine the future. According to the business value of the demand, the Development Team is a series of development and integration of a group of demands, and each development will produce a system that can be used by testing. • The planning process of the plan project XP is mainly for two issues in software development: how much work can be completed before delivery during delivery; what should I do with the next step. Continuous answer, it is to serve how to implement and adjust the development process; compared to this, I hope that the beginning of the development process will do what is going to do, how much time is spent, and it is half-time. In response to these two issues, there are two main corresponding processes in XP: Release Planning. Customers describe demand, developers estimate development costs and risks. The customer develops a rough project plan based on the importance of developing costs, risks and every demand. The initial project plan is not necessary (nor possibly) is non-accurate, because the development cost of each requirement, risk and its importance are not unchanged. Moreover, this plan will be constantly adjusted during the implementation process. Cycle Development Planning. During the development process, there should be many phases (such as a plan every three Monday). Developers may perform internal reforming and optimization (code and design) in a certain cycle, increasing new features at a certain cycle, or will do two aspects in one cycle. However, after each development cycle, users should get a system that has been implemented. Moreover, each time a cycle, the customer will reproduce the need to determine the next cycle to be completed. In each development cycle, developers will break demand into a small task and then estimate the development costs and risks of each task. These estimates are based on actual development experience, the project is much done, the estimation is naturally more accurate and accurate; in the same project, every time a development cycle, the next estimation will have more experience, reference and basis, thus more precise. These simple steps provide customers with rich, sufficient information, making it flexibly and effectively regulates development processes. Every two or three star periods, 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 advantage is that the customer can know what to do so, whether the things do it, what else to do or improve what to do; the disadvantages are what customers have seen. It may be very unsatisfactory or even abort the contract. In fact, this practice of XP is to find problems early, solve the problem, rather than waiting for a few months, the user finally saw the development 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 if the developed software meets the requirements. 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 Releases The demand for each cycle is the most needed by users. In XP, the system that is published when the period is completed each cycle, the user should be able to easily evaluate, or can be used in actual use. In this way, software development is something that can't be seen, but it is true. XP requires frequent publishing software, if possible, a new version should be released every day; and after completing any changes, integration, or new demands, a new version should be released immediately. These versions of 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 XP programmers not only work together as a development team, but also write the same program with two people for a small development unit. Developers carry out simple design, write unit tests, and write code that meets the test requirements, and constantly optimize the design under the premise of meeting demand. • It is this point to make beginners feel most confused in XP. XP requires the easiest way to implement each small demand, provided that the software developed in accordance with these simple designs must pass the test. These designs can meet the needs of systems and customers in the current demand, do not require any design of the snake, and all of these designs will be constantly 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 has been developed throughout the project: from the plan to develop a project, to develop a plan for each development cycle, to a simple design for each demand module, to the design review, and never Intermittent design reforming and optimization. The entire design process is a spiral, unpredictable process. From this perspective, XP is the ultimate of the design. • In Pair Programming XP, all code is written by two programmers - this is the most controversial in XP, and is also the most difficult thing. This ensures that all code, design, and unit tests are reviewed by another person, the quality of code, design, and testing 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 work is greatly improved working strength and work efficiency. Many programmers have been forced to try this (XP also requires support for administrative orders). Along the start of the start, and the efficiency of the two people will not be 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. In terms of all the programmers who have just started Pair Programming, 90% of people think that this work is more efficient in two months.

In project development, each person will continue to replace partners programming. Therefore, Pair Programming not only improves software quality, but also enhances knowledge exchanges and updates, enhances communication and understanding of each other. This is not only conducive to individual, but also benefits the entire project, developing teams and companies. From this point of view, Pair Programming is not only applicable to XP, but also for all other software development methods. • Test-driven development feedback is one of the four basic values ​​of XP - in software development, full feedback can only be obtained by adequate testing. The tests proposed in XP can be seen in other software development methods, such as functional testing, unit testing, system testing and load testing, etc., unusual, XP will test the unique screw incremental type During the development process, the test continues to accumulate as the project progresses. In addition, since the entire development team has code, the test is also maintained by everyone. That is, anyone should run all the tests all over before picking the program (Check IN); if anyone finds a bug, it should immediately add a test to this bug, not waiting for that program. People are completed; anyone takes over the task of other people, or modifying other people's code and design, if you can pass all tests, it will prove that his work has not destroyed the system. In this way, the test can truly help get feedback effects; and, the test should be basically covered by all customer and development requirements by continuously preparing and accumulating all of the customer, so developers and customers can get as much feedback as possible. • Refactoring XP emphasizes simple design, but simple design is not a designed-free proceedings, nor without structure, lack of reuse programming. Although developers are simple designed for each USER Story, it is also constantly improving design, this process is called design reforming and optimization. This name appears in the "Refactoring: Improving The Design of Existing Code" written in Martin Fowler. 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. The concept of Refactoring is not XP first, it has been proposed for nearly 30 years, and has always been considered to be one of the characteristics of high quality code. However, XP emphasizes that Refactoring is extremely, and should be used anytime, anywhere. Of course, after each change, the programmer should run the test program to ensure that the new system still meets the scheduled requirements. 4 Frequently integrated, collectively owned code Ownership, programming specification XP development teams often integrate different modules. In order to improve software quality, in addition to test drive development and Pair programming, XP requires everyone's code to comply with programming specification, and anyone can modify the code written by others, and everyone should actively check the code written by others. • 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 issues; acceptance. For customers, even if these systems can pass the test test, because there is short time, there is not much grasp of the customer's heart. In order to solve these problems, XP proposes that during the entire project, it 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 requirements are in line with customers and developments. After the integration, a new application system is issued. In this way, the entire project development process is almost one or two days, and a new system will be released, sometimes it will release several versions one day. With this process, customers can very clearly grasp the function and development schedule and is based on these circumstances and developers to communicate in time to ensure smooth completion of the project. • Collective Code Ownership During many project development, developers only protect their code, and many people don't like other people to modify their own code. Therefore, even if there may be a corresponding more detailed development document, a programmer is very small, and it is not willing to read other programmed code; and because you don't know what functionally achieved, a program Members generally don't dare to change the code of others. At the same time, because it is your own code, some problems may not be discovered or solved because of the limitations of time nervous or technical level. In response to this point, XP advocates everyone to share the code. Everyone has the right and obligations to read other code, discover and correct errors, reforming, and optimizing the code. In this way, these code is not only one or two people, but is done by the entire project development team. 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 see again that the various practices and rules of XP are organically combined.) • Programming Specifies All people in the XP Development team follow a unified programming standard, so all the code It seems that it is written by one person. Because there is a unified programming specification, each programmer is easier to read the code written by others, which is one of the important premise of implementing Collective Code Ownership. 5 metaphor (system metaphor), non-overtime XP processes make everyone a common, concise understanding of the system by using some image metaphors. XP believes that overtime is abnormal, because this explains the estimate of project progress and arrangements. • Metaphor (system metaphor) To help everyone unanimously understand the customer needs to complete, the system function to develop, the XP Development Team uses many 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 spiders, looking for things to capture on the Internet, then bring things back to the nest." • Overtime overtime, mean that the original plan is inaccurate, Or the program is far from knowing what work can be done. Moreover, development management personnel and customers have failed to accurately grasp the development speed; developers are therefore very fatigued.

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 project planning, progress, and resources in time. Some basic concepts in XP User Story: Developers ask customers to write all the needs into a separate story, each can be completed for a few days. During the development process, customers can make new User Story at any time, or change the previous User Story. Story Estimates and Development Speed: The Development Team is estimated to each User Story and calculates the development speed based on the actual situation in each development cycle (iTeration). In this way, developers and customers can know how little USER Story can be developed every week. Release Plan and Release Scope: During the entire development process, developers will continue to post new versions. Developers and customers determine the User Story included in each release. Iteration (Development Cycle) and Iteration Plan: During a Release process, developers ask customers to choose the most valuable User Story as the development of the next two weeks. The Seed: After the first development cycle is complete, the system submitted to the customer. Although this is not the final product, it has realized several customers to think that the most important Story, developers will gradually add new modules on the basis. Continuous Integration: Assemble the development of the User Story, one by one, step by step, and even the final product. Acceptance test (function test): For each USER Story, customers will define some test cases, the developer will automate the process of running these test cases. UNIT TEST: Before starting the write prior, the programmer first writes the corresponding test program for most classifications. Refactoring (Reforming and Optimization): Remove the redundancy in the code, increase the reusability and scalability of the code. A successful factor of small junction XP is to pay attention to customer feedback - the purpose of development is to meet the needs of customers. The XP method enables developers to be confidently facing changes in customer needs. XP emphasizes teamwork, managers, customers and developers are one of the development teams. The team is working to develop high quality software by using XP's simple but effective way to use XP. The setup of XP is simple and efficient; the programmer obtains customer feedback through testing, and modifies the code and design according to the change, they always give the software to the customer as soon as possible. XP programmers can be brave in facing demand and technology changes. XP is very like a mental puzzle that is tied up by many small pieces. It doesn't make sense to see every small piece alone, but after assembled, a beautiful picture will be present in front of you.

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

New Post(0)