Extreme Programming Refactored: The Case Against XP

For a process to achieve the agile values and principles [2] without being fragile, we believe that it must provide operations and procedures that

The first item makes the process agile; the other three prevent it from being fragile. Analyzing those last three items should, then, help us to come up with a process that s agile without being fragile. So let s look at each of these in turn and see how XP compares .

A Good Agile Process Should Decrease Risk

For a process to be truly agile, it must provide operations and procedures that decrease risk. A risk is a thing, event, or trend that, unless properly addressed, could impact the project in a negative way. [3]

XP reduces risk by encouraging the use of unit tests, pair programming, acceptance tests, constant refactoring, very short iterations, frequent code integration, and so on. However, each of these practices comes at a cost in terms of the time taken to implement and maintain it.

However, XP increases risk because . . . well, because of all the reasons we ve described in this book.

A Good Agile Process Should Encourage Contingency

For a process to be truly agile, it must provide operations and procedures that encourage contingency. This enables the project team to keep responding to change (such as changes in requirements or changes in management, market forces, and so on that could adversely affect the project) without increased risk.

With any project, XP or otherwise , a question to ask yourself is, What if something goes wrong? For example:

XP addresses the problem of the chief programmer leaving the project by encouraging all team members to know about all parts of the design and code in enough detail to be able to pick up where somebody left off at any time. This is a pretty robust approach, but it comes at a massive cost.

We discuss some of the reasons why the XP approach is costly in Chapter 3.

 

Contingency isn t just about having backup plans, it s also about lessening the likelihood that you ll need those backup plans. In addition, it s good to know that the alternatives have been thought about, should it come to that (but also see the comment about embellishment in the next section).

You can t plan for the unknown (at least not accurately). But you can prepare contingency, so that when things do go wrong, they don t take your entire project with them.

A Good Agile Process Should Prevent Fragility

For a process to be truly agile, it must provide operations and procedures that prevent fragility.

A development process is fragile (or becomes fragile) if

We discuss the high discipline aspect of XP in the section A Self-Referential Safety Net (Circle of Snakes) in Chapter 3.

 

We discuss the reasons why XP doesn t comfortably scale up in Chapter 14.

 

Contingency vs. Embellishment: Why XP Gets It Wrong

Somewhere, there has to be a compromise when weighing how much contingency to factor into your project. The XP ethos is correct, at least insofar as each project deliverable must be justifiable in some way. If you re spending time producing a document, you should be able to explain how it will benefit the project. Each document should return a profit in terms of the effort invested in it. Otherwise, why spend the time producing it?

But (there s always a but ) XP takes this too far by cutting out practices that are essential to any software project.

We discuss the practices essential to any software project (e.g., sufficient up-front design, precode interaction design, and in-depth requirements elicitation ) in the Extreme Programming Defanged section in this chapter. We discuss the likely results of not using them in Chapter 3 and pretty much the rest of the book.

 

In fact, XP approaches contingency in the wrong areas. Specifically, all of XP s practices are geared toward making sure the software is fully functional and releasable at any stage in the entire project, just in case the project should be cancelled without warning. Although this is admirable, the result is a process that takes a lot of ongoing effort from the entire team just to keep the software releasable at all times.

SOLUTION  

Our refactored process relaxes contingency around the sheer effort involved in keeping the software constantly releasable. We focus instead on making the software releasable for certain key milestones. This frees up the team s time to concentrate on other, higher risk areas.

 

[2] See http://www.agilemanifesto.org.

[3] There s a good discussion of risk management in Chapter 5 of Steve McConnell s Rapid Development (Microsoft Press, 1996).

[4] Alistair Cockburn, Agile Software Development (New York, NY: Addison-Wesley, 2001), p. 142.

Категории