Professional Documents
Culture Documents
Methodology
Extreme Programming (XP)
Extreme Programming (XP)
• In XP, you write code in pairs sitting at one machine. You and your pair talk
to each other while analyzing, implementing, and testing the feature you’re
working on. Pair programming is particularly effective in producing code
with fewer defects while also being engaging, fun, and tiring.
• Ten Minute Build: The continuous integration server is expected to build the
whole project — including running all the automated tests — in ten
minutes at the most. This limit serves to keep tests lean and mean, i.e.
focused.
• Test-First Programming: In XP, you implement your features using the test-
first approach, also called test-driven development (TDD.)
TDD
• TDD consists of developing using a straightforward cycle:
• you write a failing test;
• then, you write production code to make the test pass;
• if needed, you refactor the production code to make it cleaner and easier to understand.
• TDD brings several benefits to the table.
• First, feedback. If it’s hard to write a test, the design you’re going for or have inherited, is
probably too complex, and you have to simplify it.
• Second, TDD allows programmers to trust the code they write, and creates a nice, cyclical
rhythm where the next step is always clear.
• Using TDD from the start ensures 100% code coverage.