Extreme Programming (XP) 12 Core Practices

归档来源: 《Extreme Programming Explained: Embrace Change》(Kent Beck, 1999) | 归档整理
一、 开发过程实践 (Process & Release)
01. 计划游戏 The Planning Game
Quickly determine the scope of the next release by combining business priorities and technical estimates.
结合业务优先级与技术工作量评估,快速确定下一个迭代/发布的范围。
02. 小型发布 Small Releases
Put a simple system into production quickly, then release new versions on very short cycles.
快速将简单系统投入生产,随后以极短的周期持续发布新版本。
03. 隐喻 Metaphor
Guide all development with a simple shared story of how the whole system works.
用全团队通用的简单故事/比喻来引导整个系统的工作原理与架构视角。
04. 现场客户 On-site Customer
Include a real, live user on the team, available full-time to answer questions.
让真实用户或业务代表全职驻留团队,实时解答疑问与验收功能。
二、 代码与设计实践 (Engineering & Quality)
05. 简单设计 Simple Design
The system should be designed as simply as possible at any given moment. Extra complexity is removed as soon as it is discovered.
任何时刻都保持最简设计(YAGNI/KISS),一旦发现多余的复杂度立即移除。
06. 测试驱动开发 Testing / TDD
Programmers continually write unit tests, which must pass completely for development to continue.
持续编写自动化测试,所有测试必须完全通过才能继续后续开发(红-绿-重构)。
07. 重构 Refactoring
Programmers restructure the system without changing its behavior to remove duplication, simplify, or add flexibility.
在不改变外部行为的前提下调整代码结构,消除重复、提升清晰度与灵活性。
三、 团队协作实践 (Team & Environment)
08. 结对编程 Pair Programming
All production code is written with two programmers at one machine.
所有生产代码均由两位程序员在一台电脑上共同编写(Driver & Navigator)。
09. 集体代码所有权 Collective Ownership
Anyone can change any code anywhere in the system at any time.
消除知识孤岛,团队中任何人可以在任何时间修改系统中的任意代码。
10. 持续集成 Continuous Integration
Integrate and build the system many times a day, every time a task is completed.
每完成一个任务就集成并构建系统,保持每天多次的高频集成。
11. 每周40小时工作制 40-Hour Week
Work no more than 40 hours a week as a rule. Never work a second week of overtime in a row.
保持可持续的开发节奏(Sustainable Pace),拒绝连续加班以维持高代码质量。
12. 编码标准 Coding Standards
Programmers write all code in accordance with rules emphasizing communication through the code.
统一团队编码规范,强调通过代码本身传递清晰的意图与沟通。