XP essence
How to make Java projects more successful
Roy W. Miller (rmiller@rolemodelsoft.com)
Software developers, rolemodel Software, Inc.
Christopher T. Collins (ccollins@rolemodelsoft.com)
Advanced Software Developers, Rolemodel Software, Inc.
March 2001
content:
Corporate problem
Solution: Flexible method
12 methods of XP
Method of working together
Why is XP very important
Reference
About author
Evaluate this article
Object-oriented programming with Java languages becomes unprecedented. It makes software development a certain degree of change, but recent research shows that there are half of the software development projects lag, and one-third of the project exceeds budget. The problem is not in technology, but the method used by the development of software. The so-called "lightweight" or "flexible" mode provides a very interesting solution with the power and flexibility of the object-oriented language such as Java. The most common flexibility is called extreme programming or XP, but many people don't really understand it. Using XP for Java projects can greatly increase successful opportunities. This article provides an overview of XP and explains why it is very important - not a rumor, no scam.
In the past decade, CEOs face huge pressure in terms of steady income. They solve this problem by taking a series of initiatives in many ways, such as reduced the company's scale, outsourcing, re-engineering, corporate resource planning (ERP) and so on. These for low-efficiency solutions allow many companies in S & P 500 to maintain two-digit revenue growth in the end of the 1990s. But this way also brings some negative impact.
In the book of Leading The Revolution (see Resources) in Gary Hamel, he claims that there are some signs that the advantages of traditional enterprise models are not so obvious. We must find some alternatives to power the continued growth of income. He suggested that the only way to continue to grow will be a thorough innovation. We believe that this is especially true in the field of software development.
Corporate problem
If you use standard software development methods, even if you develop on the Java platform, you must prepare for disappointment. As shown in Figure 1, recent research shows that half of the project will lag, and one-third of the project will exceed the budget. This speculation is not much better than the research results of the US Total Affairs Bureau in 1979.
Figure 1. Successful and failure of software projects, past and present
If we hope that these numbers have significantly improved, they need to be completely innovative to develop software. There are two main factors that affect existing methods:
Fear failure
Misunderstanding for software nature
No one is intended to fail. Ironically, the method created to minimize failure is failed. Misunderstanding for software is the root of the problem. Fear is actually just a symptom. The existing approach is created by those smart people who have a good wish but forget the "soft" in the software. They assume that the development software is like a bridge. Therefore, they learn from various design specifications for optimal methods suitable for "hard" objects (such as bridges). The result is based on Big Design Up-Front (BDUF) ideology, the development method of slowing, the software is unbearable, and people cannot use them.
Solution: Flexible method
There have been some transformations recently, from the so-called "weight type" method to "lightweight" or "flexible" approach, such as Crystal method, adaptive software development, and (currently most popular) XP. All of these processes have such a fact that people need people to develop software. Successful software process must maximize people, minimize their shortcomings, as the advantages and disadvantages are unwound. In our opinion, the best place in XP is that it can solve all complementary powers that affect participants. XP provides a largest opportunity for ten years to bring thorough changes to the software development process. Just as the PeopleWare writer Tom Demarco said, "XP is the most important movement in the fields in the field today. It is expected that it is the same as the importance of the current generation, like the importance of the previous generation. "
XP specifies a set of core values and methods to allow software developers to play their expertise: write code. XP eliminates the unnecessary product of most of the weight-based processes, deviates from the target by slowing the development speed, cost development personnel (such as dry special report, state report, and multi-volume demand document) from the target deviation. We recognize that something called "Extreme Programming" may be difficult as a formal development process to recommend to management, but if your company is engaged in the software industry, you should help management to bypass its name to recognize the competition that XP can provide. Advantage.
Kent Beck summarizes the core value of XP in the Extreme Programming Explained: Embrace Change book (see Referring). We have summarized them:
communicate with. The problem of projects can often be traced back to someone who does not discuss some important issues with others at a moment. Using XP, it is impossible to communicate.
simple. XP recommends that you always do your simple matter around the process and write code. According to Beck, "XP is bet. It is better to do something simple today ... not more complicated but may never use."
Feedback. Earlier and frequent feedback from customers, teams, and actual end users provide more opportunities to adjust your strength. Feedback allows you to grasp the right direction and walk less.
courage. Courage exists in other three values. They support each other. It is necessary to be courage to believe that the specific feedback on all the way is better than preamble. Be courage is required to communicate with other people in the team that may expose your ignorance. The courage is required to make the system as simple as possible, and the decision to tomorrow will be pushed tomorrow. And if there is no simple system, there is no constant exchange to expand knowledge, no feedback on the direction, the courage is lost.
The XP method converts these values into developers to do every day. There is no fresh content here. Over the years, the industry has recognized that the XP method is "optimal method". In fact, "extreme" in XP comes from two aspects:
XP takes the proven industry optimal method and exerts it to the extreme.
XP combines these methods in some way so that the results thereof are greater than the sum of each part.
What kind of scene is this? The code review is a good practice, so it is always done by pairing code. Test is also a good practice, so always by writing tests before writing code. The document is rarely consistent with the code, so only those most needed, the remaining part depends on the code and test of the clearly written code. XP does not guarantee that people do the right thing, but it allows people to do so. It combines these "extreme" methods in a mutually supported manner, significantly improves speed and effectiveness.
Two ways to XP
The twelve methods of XP (shown in Figure 2) are defined as rules. Let us carefully study each method for "Executive XP" what has a more comprehensive understanding.
Figure 2. Twelve methods of XP
Planning Strategy
Some people will accuse XP is a plagiarite of a beautiful name, just a group of cowgirls put together a system together without any rules. wrong. XP is one of several ways to recognize that you can't do everything at the beginning. Whether it is a user or developers, it will gradually understand the progress of the project. Only methods that encourage and believe in this change are effective ways. Status limiting method ignores changes. And XP pays attention to changes. It is listening to the way is "Planning Strategy", a concept created by Kent Beck. The main thinking behind this method is to quickly develop a rough plan, and then gradually improve with the continuous clarity of things. The product of planning strategy includes: a bunch of index cards, each contains a customer material, iteration of these material driver projects; and a rough plan for the next one or two issues, such as Kent Beck and Martin Fowler in their Planning Extreme PROGRAMMING is described (see Resources). Key factors that make this form of programs work are to let users do business decisions, let the development team do technical decisions. If there is no premise, the whole process will land.
The development team should decide:
It is estimated how long it takes to develop a material
Cost spending using various technical options
Team organization
"Risk" of each material
The order of material development in iteration (the one in the development of risk can be developed to alleviate the risk)
Customers need to decide:
Range (a distribution material and every iterative material)
issue date
Priority (based on corporate value, which features are developed first)
Planning often occurs. In this way, while customers or developers learn new things, they provide frequent opportunities for their adjustment plan.
Pair programming
Using XP, a pair of developers write all product code. This way is listened to the lack of efficiency. Martin Fowler said, "When people say that the programming reduces productivity, I will answer, 'that is because most of the time-consuming programming part is completed by input.'" In fact, the pair programming is in the economy or other aspect It provides a lot of benefits:
All design decisions involve at least two people.
At least two people are familiar with each part of the system.
It is almost impossible to have two people with both neglect test or other tasks.
Changing the combinations of each pair are propagating knowledge within the team.
The code is always reviewed by at least one person.
Studies also show that pair programming is actually more efficient than individual programming (for more information, see the Costs and Benefits of Pair Programming in Alistair Cockburn and Laurie Williams).
test
There are two tests in XP:
unit test
Acceptance Test
Developers write unit tests while writing code. Customers write acceptance tests after they define materials. The unit test promptly tells the developer system "work" at a certain point. The acceptance test tells the team system whether or not the user wants the operation you want to perform.
Suppose the team uses an object-oriented language such as Java, and developers write unit tests for each possible failed method before writing code for some ways. Then they write enough code to make it test. Sometimes people will find that this is a bit strange. The answer is simple. Write tests first provide you with:
A group of possible most complete tests
The simplest code that may work
Code intent for clear sight
Developers can only check the code into the source code repository after testing through all units. The unit test makes the developer confident that their code can work. This leaves a clue for other developers, which can help them understand the earliest developers (actually, this is the best document we have seen). The unit test also gives the developer courage to re-divide the code, because the test failure can tell the developer's error. The unit should be automated and provide a clear pass / failed result. The XUnit framework (see Referring) is far more than these, so most XP teams use them. The user is responsible for ensuring that each material has an acceptance test to confirm them. Users can write tests themselves to recrue other members of the organization (such as QA personnel or business analysts) to write them, or combine these two methods. Tests tells them whether the system has the characteristics that should have, and whether it can work correctly. Ideally, the user should write the acceptance test of those materials in iterations before iteration is completed. The acceptance test should be automated and to ensure that the developer does not destroy any existing features when the new feature is realized. Normally, customers need certain help from the development team to write an acceptance test. We develop a reusable automatic acceptance test framework for a project, allowing users to enter their input and desired output in a simple editor. The frame will convert the input into XML files, run the test in the file, and then "pass" or "failed" for each test. Customers like this practice.
Not all acceptance tests must pass in all situations. The problem is that the acceptance test helps the customer measures the "completion" of the project. They can also make customers informed that certain things can be issued.
Re-divide
Resets are improved on the code without changing the functionality. The XP team is not soft when it is re-divided.
Developers have two important opportunities: Before and after realization. Developers try to determine if the existing code can make new features easier. They check the code just written, see if there is a way to simplify it. For example, if they think there is an abstract opportunity, re-dividing the repetition code from the specific implementation.
XP recommends that you should write the simplest code that may run, but it is also recommended that you should continue to learn. Resets let you join the knowledge to the code and will not damage the test. It makes your code simply. This means that it can exist for a long time, introducing less problems for future developers and guiding the correct direction for them.
Simple design
The XP's liberaltor said that the process ignores the design. This is not the case. The problem is that the weight-based method recommends that you do it in advance to complete most of the trivial design tasks. This is like a photo of a static horizon, still keeps moving, then try to draw a perfect map to get there. XP says that design should not be held in advance under the premise that things will remain unchanged. XP believes that the design is very important, so it should be a continuous transaction. We always try to use the easiest designs that work, and then change it with reality.
What is the simplest design that is possible? It is a design that meets the following conditions (thanks to Kent Beck to list one by one):
Run all tests
Does not include duplicate code
Clearly state the programmer's intention to all code
Contains minimal as possible and methods
The need for simple design is not to say that all designs are small, nor does it mean that they are insignificant. They only need to be as simple as possible, but still work. Do not include additional characteristics that are not used. We call like YAGNI, indicating that "You will don't need it (You Aren't going to need it)." Don't let YAGNI destroy your successful opportunity.
Collective code ownership
Anyone in the group should have the right to change the code to improve it. Everyone has all code, which means everyone is responsible for it. This technique allows people to make the necessary changes to some code without having to pass the personal bottleneck of the code owner. Everyone is responsible for this fact that eliminates the chaos brought by no code ownership.
"Everyone has all the code" and the "no one has code" and is different. When no one has code, people can destroy everywhere without having to lose any responsibility. And XP said, "If you are destroyed, you should make up." We have some unit tests that must be run before and after each integration. If you destroy certain things, you have to be responsible for patching, whether it is part of the code. This requires extreme rules. It may be another reason for "extreme" in the name. Continuous integration
Code integration often can help you avoid integrated dreams. The XP team integrates a code several times a day, and each time all unit tests are executed after running the system.
The traditional method works as follows: After writing a large number of code, perform a large explosive integration, then spend a considerable time to change the problem. This clumsy form does slow down the project speed. Big bang integration brings a lot of problems to the team, and these problems usually have hundreds of possible reasons.
If integrated frequently, any specific integration failure will be very obvious (previously running test, therefore the error must be made by new things). Using this method, when you encounter problems, possible reasons are quite limited. It is easier to modify, and the time is much less, so that the team maintains the fastest movement.
On-site customer
To make functions, the XP group needs to have a customer to clarify the material and make important business decisions. Developers are not allowed to do these things alone. Let customers have the bottleneck that will be able to eliminate the developer waiting for decision-making.
XP does not pretend that the material card is the only indication required for developers to deliver the necessary code. The material is a commitment to fill in the details between customers and developers. Unlike all requirements in a static document, its idea is to face face-to-face communication and reduce opportunities for misunderstanding.
We have found that it is the best way to make customers in the scene, but this is not the only solution to solve the problem. The bottom line is that customers must answer questions at any time and provide instructions to provide instructions based on corporate value. If the customer does not do this if the customer is in the field of full-time companion team, it is good. This will be more convenient if you can stay with the team, but it's just a suggestion.
Small release
The release should be as small as possible while still providing sufficient business value to prove they worth it.
As long as you feel meaningful, you can release the system. This will provide users with value as much as possible (please remember, today's money is worth money than tomorrow). The small distribution will provide developers with specific feedback, telling them which meet the customer needs, which does not meet customer needs. The Group can then include these lessons include in its next release.
40 hours a week
Kent Beck says he hopes "... I feel that there is a passion every morning, I am tired every night." I can do this for 40 hours a week. The exact amount is not important, it is important. Long-term continuous work will kill work performance. Fatigue developers will make more mistakes. From the long run, it will be much slower than the development of "normal" schedule.
Even if the developer can work well for a long time, this does not mean that they should do this. In the end, they will be tired, they will leave their work or have a non-working problem that affects their performance. If you disrupt people's lives, you will taste the evil it brings. Overtion is not an answer to the project problem. In fact, it is a greater symptoms. If you want to go to the dying, you can save it.
Coding standard
There are two purposes with coding standards:
Preventing teams from being smashed by some things that do not develop this irrelevant to the maximum speed.
It supports other methods.
If there is no coding standard, re-dividing the code will be more difficult, and more difficult, fast advancement is more difficult to exchange it. The goal should be that no one is identified which part of the code written in the team. A protocol is reached with a team unit and then comply with this standard. The goal is not a guidelines that create a non-wonderful rule, but provide guidelines that will make sure your code can clearly communicate. At the beginning of the coding standard, it should be simple and then gradually evolved according to team experience. Don't spend too much time in advance. Create the simplest standard that works, and then gradually develop. System metaphor
What is the architecture to do? It provides a screen of the various components of the system and how they interact - a mapping that allows developers to understand where the new code section is suitable.
The system metaphor in XP is similar to the architecture called most methods. The metaphor provides a consistent picture that can be used to describe the working mode of the existing system, the new part is suitable, and they should take.
What is important is to remember that the key is to let everyone understand how the system is combined, not a beautiful metaphor. Sometimes you can't think of a good metaphor. It's great to think of thinking.
Method of working together
The whole is greater than the sum of each part. You can achieve a single method or a small part of the method, which is more income than using any way. But you can only get the maximum benefit in the event of all methods, as their power comes from interactions between them.
Initially, XP is performed in accordance with books, as a baseline. Once you understand how to interact, you have the knowledge you need to adapt to your own environment. Remember, "XP" is not the purpose, but to reach a means of ending. The goal is to quickly develop advanced software. If your process has some variation, it is not called XP, but the result will still let you defeat all competitors, you have succeeded.
Why is XP very important
Frankly, XP (or any other flexible method) is not important. The result it can generate is the key. If this flexible way such as XP can help you develop better software more quickly, then it is worth considering.
Remember those who mentioned when we started at this article? We believe that using XP development, object-oriented software, can have the opportunity to make them better. At present, our experience has confirmed this belief.
Reference
Detailed information about XP in the XP Portal of RoleModel Software.
It can be found in the Costs and Benefits of Pair Programming in Alistair Cockburn and Laurie Williams (XP2000 Submission, 2000).
On Pairprogramming.com, you can know that the programmed regular details are known.
Download the XUnit test tool.
If you want to know more information about XP, be sure to select a book referenced in this book:
Planning Extreme Programming, by Kent Beck and Martin Fowler (Addison-Wesley, 2000)
Extreme Programming Explained: Embrace Change, by Kent Beck (Addison-Wesley, 1999)
Leading The revolution by Gary Hamel (Harvard Business School, 2000)
Jeff Canna's article for units and functional tests (DeveloperWorks, March 2001) use XP philosophy to test.
About author
Roy W. Miller is a software developer of rolemodel Software, Inc. During RoleModel, ROY has developed a Java / XML automatic automatic acceptance test framework and created several applications for several applications for the Tini Java platform of Dallas Semiconductor. Before joining Rolemodel, he served six years in Andersen Consulting (now Accenture), using their dedicated weight-based commercial integration method (MIB) and its variants. Since joining RoleModel, he got a lot of experience in XP and local adaptation to this method. Roy with others in the Addison-Wesley XP series (XP Applied, will be published in October 2001) and a member of the XP2001 "Business Of" display at a concert group member . You can contact ROY with RMiller@rolemodelsoft.com. Christopher T. Collins is a high-end software developer of Rolemodel Software, Inc. During RoleModel, Chris participated in an XP project for nearly two years, developed an embedded Java application for the new Motorola honeycomb phone platform, and port JUnit to the J2ME platform of Sun. Before joining rolemodel, he spent 5 years using many different languages for some organization development software, and recently developed applications for the US Department of Defense. He has experience in use and adapts to several flexible and heavyweight different development methods, including RUP and XP. CHRIS has a master's degree in computer science and software engineering in the University of West Florida, currently teaches Java programming courses in North Carolina State University. He used to be a special speaker of XP, and will introduce the paper adaptation in XP2001. Contact CCollins@rolemodelsoft.com and Chris.
Finishing release