极限编程(Extreme Programming)—XP基础

来源:互联网 发布:导航端口与波特率 编辑:程序博客网 时间:2024/03/29 08:39

march-bird lucian yjf taopin wl jazz韩伟 nullgate Simon[AKA](转载自cutter.com)    2003年09月15日

  As we have explored in several issues of eAD, the two most pressing issues in information technology today are:

  正如我们在eAD的若干期中探究的那样,当今信息技术中最迫切的两个问题是:

  How do we deliver functionality to business clients quickly?
  
  如何能快速地向商业用户交付功能?

  How do we keep up with near-continuous change?

  如何才能跟上近乎连续的变化?

  Change is changing. Not only does the pace of change continue to accelerate, but, as the September issue of eAD pointed out, organizations are having to deal with different types of change -- disruptive change and punctuated equilibrium. Disruptive technologies, like personal computers in the early 1980s, impact an industry (in the case of PCs, several related industries), while a punctuated equilibrium - a massive intervention into an ecosystem or an economy -- impacts a very large number of species, or companies. The Internet, which has become the backbone for e-commerce and e-business, has disrupted a wide range of industries -- more a punctuated equilibrium than a disruption.
  
  变化本身也在不断地变化中。不仅仅是变化的速度在不断地提高,而且,如eAD的10月中所指出的, 组织正在不得不应付各种类型的变化-- 剧变与不断被打破的平衡。 产生剧变的技术,象在80年代早期的个人计算机,冲击了一个工业(PC机以及若干相关的工业)而不时打断的平衡--一个对生态系统或者对整个经济产生巨大影响的介入--则 影响了无数的物种,或者说,公司。已经成为电子商务支柱的Internet, 就已使大范围的行业产生剧变--更多的是打断的平衡而不仅仅是一次剧变。

   When whole business models are changing, when time-to-market becomes the mantra of companies, when flexibility and interconnectedness are demanded from even the most staid organization, it is then that we must examine every aspect of how business is managed, customers are delighted, and products are developed.

  当整个商业模式正在发生变化,当"时间意味着市场"正成为公司的咒语,当适应性与互连性正在成为甚至是最呆板的组织的需要的时候,我们将有必要检查以下的每一个方面:商业是如何管理的,客户为什么而感到高兴,以及产品是如何开发的。

  The Extreme Programming movement has been a subset of the object-oriented (OO) programming community for several years, but has recently attracted more attention, especially with the recent release of Kent Beck's new book Extreme Programming Explained: Embrace Change. Don't be put off by the somewhat "in-your- face" moniker of Extreme Programming (XP to practitioners). Although Beck doesn't claim that practices such as pair programming and incremental planning originated with XP, there are some very interesting, and I think important, concepts articulated by XP. There's a lot of talk today about change, but XP has some pretty good ideas about how to actually do it. Hence the subtitle, Embrace Change.

  终极编程(Extreme Programming )运动成为面向对象编程这个团体的一部分已经有数年了, 但是直到最近才引起了越来越多的注意,特别是最近Kent Beck的《终极编程 释义:拥抱变化》(Extreme Programming Explained: Embrace Change)一书的出版。千万不要因为终极编程(业内人简称为XP)这一称呼而对它产生反感。 尽管Beck没有说象配对编程(pair programming),增量式计划(incremental planning)之类的来源 于XP,但是仍然有一些非常有趣的,我认为也是很重要的概念可以借用XP来表达。现有有许多关于变化的讨论, 但是XP却有许多如何实际去做的非常好的想法。也就是这个副标题:拥抱变化。

  There is a tendency, particularly by rigorous methodologists, to dismiss anything less ponderous than the Capability Maturity Model (CMM) or maybe the International Organization for Standardization's standards, as hacking. The connotation: hacking promotes doing rather than thinking and therefore results in low quality. This is an easy way to dismiss practices that conflict with one's own assumptions about the world.

  有一种趋势,特别在那些严格的方法论者中,希望剔除那些与"能力 成熟度模型"(Capability Maturity Model CMM)或者是国际标准化组织的标准相比不那么笨重的方法,比如象hacking.注释: hacking推崇行动而不是思考从而导致了较低的质量。 剔除与某人关于这个世界的假设相冲突的实践,这倒不失为一种简单的方法。

  Looked at another way, XP may be a potential piece of a puzzle I've been writing about over the past 18 months. Turbulent times give rise to new problems that, in turn, give rise to new practices -- new practices that often fly in the face of conventional wisdom but survive because they are better adapted to the new reality. There are at least four practices I would assign to this category:

  从另一个角度来看XP,它倒可能是一个难题的某个潜在的部分,这个一个我在过去18个月中一直都在写的内容。混乱 的时期产生新的问题,而后者又导致了新的实践--新的实践公然违抗 传统的知识,但却得以幸存下来是因为它们能更好地适应这个新的现实世界。至少有四种实践方式我觉得是属于这个范畴的:

XP -- the focus of this issue of eAD

XP -- eAD本期的焦点

Lean development -- discussed in the November 1998 issue of eAD

轻量级的开发(Lean development)--已经在eAD 1998 11月中讨论

Crystal Light methods -- mentioned in the November 1999 issue of eAD and further discussed in this issue

轻量级的Crystal方法(Crystal Light methods)--曾在eAD 1999年11月提到,在本期中将做进一步的讨论

Adaptive software development -- described in the August 1998 issue of eAD (then called Application Development Strategies -- ADS)

自适应软件开发(Adaptive software development)--在eAD1998年8月中描述过(当时叫做应用开发策略Application Development Strategies -- ADS)

  Although there are differences in each of these practices, there are also similarities: they each describe variations from the conventional wisdom about how to approach software development. Whereas lean and adaptive development practices target strategic and project management, XP brings its differing world view to the realm of the developer and tester.
  
  尽管这些实践中存在着差异,但是它们中也有相似的地方:它们都描述了与传统软件开发不同的方法。 虽然轻量级的开发与自适应开发针对的是战略与项目管理的,但是XP却用不同的视角将开发方法带入了程序员与测试员的领域。

  Much of XP is derived from good practices that have been around for a long time. "None of the ideas in XP are new. Most are as old as programming," Beck offers to readers in the preface to his book. I might differ with Beck in one respect: although the practices XP uses aren't new, the conceptual foundation and how they are melded together greatly enhance these "older" practices. I think there are four critical ideas to take away from XP (in addition to a number of other good ideas):

  XP中许多部分其实都来自于业已存在的那些优秀的开发实践。"XP中没有一个想法是全新的。大多数想法产生的时间实际上和编程一样古老"Beck在他书中的前言中这样说道。但是我在某一个方面考虑的也许与Beck有所不同: 尽管XP所用的实践方式不是全新的,但是概念的建立以及它们如何融合在一起极大地增强了 这些"老"的实践。我想(除了许多其它的好思想外,还)可以从XP中提炼出四个关键的思想:

The cost of change

变化的成本

Refactoring

重构

Collaboration

协作

Simplicity

简单化

But first, I discuss some XP basics: the dozen practices that define XP.

  但是首先,我们来讨论XP的基础:那十二个用于XP的实践方式。

XP - The Basics

XP-基础

  I must admit that one thing I like about XP's principal figures is their lack of pretension. XP proponents are careful to articulate where they think XP is appropriate and where it is not. While practitioners like Beck and Ron Jeffries may envision that XP has wider applicability, they are generally circumspect about their claims. For example, both are clear about XP's applicability to small (less than 10 people), co-located teams (with which they have direct experience); they don't try to convince people that the practices will work for teams of 200.

  我必须承认一件事情,就是我喜欢XP的原因应该是它没有其他的那些花哨的东西。支持XP的人们总是会向你指出XP适合的地方以及他的某些局限性。而XP的实践者Beck以及Ron Jeffties却相信XP会有更广泛的应用前景。他们通常对于自己的要求都是很谨慎的。例如:小的(小于10人),公司局部(他们有直接的经验)两者对于XP的适应性都是很清楚的;他们并没有试图让人们相信XP可以适用于一个200人的团队。

The Project

工程

  The most prominent XP project reported on to date is the Chrysler Comprehensive Compensation system (the C3 project) that was initiated in the mid-1990s and converted to an XP project in 1997. Jeffries, one of the "Three Extremoes" (with Beck and Ward Cunningham), and I spent several hours talking about the C3 project and other XP issues at the recent Miller Freeman Software Developer conference in Washington, DC, USA.

  最为著名的XP项目是克莱斯勒综合补偿系统(称为C3工程),它在上个世纪的90年代中期开始,到1997演变为XP。Jeffries,是"终极编程三人组"之一(另外两个是Beck同Ward Cunningham) 。我在华盛顿特区同自由软件人谈论了有关C3的以及其他与XP项目有关的东西。

=================================
注解: Chrysler Comprehensive Compensation system 克莱斯勒综合补偿系统
================================

  Originally, the C3 project was conceived as an OO programming project, specifically using Smalltalk. Beck, a well-known Smalltalk expert, was called in to consult on Smalltalk performance optimization, and the project was transformed into a pilot of OO (XP) practices after the original project was deemed unreclaimable. Beck brought in Jeffries to assist on a more full-time basis, and Jeffries worked with the C3 team until spring 1999. The initial requirements were to handle the monthly payroll of some 10,000 salaried employees. The system consists of approximately 2,000 classes and 30,000 methods and was ready within a reasonable tolerance period of the planned schedule.

  最初,C3是一个基于OO(面向对象技术)的开发项目,尤其是它采用Smaltalk语言进行开发。(Smaltalk :Xerox公司开发的一种高级程序设计语言,它支持和鼠标合用的选项屏驱动式应用程序,有助于建立便于使用的计算机程序。)作为著名的Smalltalk专家,Beck被邀请来讨论有关SmalTalk性能优化的问题,并且在原项目被认为不可救要的时候将其变为一个采用面向对象OO(XP)方法的试验性项目。Beck并且带来了Jeffries用于帮助那些基本的东西,Jeffries在C3组一直干到1999年的春天。最开始的需求是要做一个对约10,000个雇员每月薪水发放进行管理的系统。这个系统由大约2,000个类以及30,000个方法构成,并且在计划方面提供有合理的容忍度

  As we talked, I asked Jeffries how success on the C3 project translated into XP use on other Chrysler IT projects. His grin told me all I needed to know. I've been involved in enough rapid application development (RAD) projects for large IT organizations over the years to understand why success does not consistently translate into acceptance. There are always at least a hundred very good reasons why success at RAD, or XP, or lean development, or other out-of-the-box approaches doesn't translate into wider use -- but more on this issue later.

  正向我们所谈到,我问Jeffries他怎样成功的将C3变为XP并应用到其他的克莱斯勒IT项目。他笑着告诉了我。多年来我为许多大型IT组织开发了不少RAD系统(快速原型开发),因此我知道为什么我们无法将成功的经验运用于其它项目中. 对于RAD, XP, 轻量级的开发以及其它一些未得到广泛应用的方法, 它们成功的原因至少有一百条.