Upload
martena-galloway
View
20
Download
6
Embed Size (px)
DESCRIPTION
Introduction to Extreme Programming. William C. Wake [email protected] 2-2-2000. XP is. $. $. t. t. Background: Cost of Changes. “Now” (flattened). “Then” (exponential). Background: Cost of Money. “Up-front design”. $. $$. “Pay as you go”. t. XP Principles. Rapid feedback - PowerPoint PPT Presentation
Citation preview
Introduction toExtreme Programming
William C. [email protected]
XP is...
A lightweight developmentmethodology that emphasizes: ongoing user involvement testing pay-as-you-go design
Background: Cost of Changes
t
$
t
$
“Then” (exponential) “Now” (flattened)
Background: Cost of Money
t
$“Up-front design”
“Pay as you go”
$$
XP Principles
Rapid feedbackAssume simplicityIncremental changeEmbrace ChangeQuality Work
XP Practices
Planning GameMetaphorTestsRefactoring Pair programming
Small releases
Simple designCollective
ownershipContinuous
integrationOpen workspace40-hour week
Rights
Manager and Customer:
You have the right.. to an overall plan, to know what can be accomplished, when, and at what cost.
etc.
Developer:
You have the right.. to know what is needed, via clear requirement stories, with clear declarations of priority.
etc.
The XP Cycle (in the small)
analysis
test
code
design
Planning Game
User stories = lightweight use cases2-3 sentences on a file card that: The customer cares about Can be reasonably tested Can be estimated & prioritized
Planning Game
Users write storiesDevelopers estimate themUsers split, merge, & prioritizePlan overall release (loosely) and the
next iteration
Tests
Functional TestsUnit Tests
Functional Tests
Specified by the userImplemented by users, developers,
and/or test teamAutomatedRun at least dailyPart of the specification
Unit Tests
Written by developersWritten before and after codingAlways run at 100%Support design, coding, refactoring,
and quality.
Test Metrics
Tests failed
Tests passed
1 2 3 4 5 6 7
Key:
Design
Pay as you goSpike when necessary“You aren’t gonna need it”“Simplest thing that could possibly
work”“Once And Only Once”
Refactor (Mercilessly)
Refactor = to improve the structure of code without affecting its external behavior
Done in small stepsSupported by unit tests, simple
design, and pair programmingSeek “once and only once”
Refactoring Example
Replace Magic # w/Symbolic Constant:
return 32.5 * miles_traveled;
static final double MILEAGE_RATE = 32.5;…return MILEAGE_RATE * miles_traveled;
Separate Queryfrom Modifier:
Stack: Object getTopAndPop();
Object getTop(); void pop();
Adopting XP
Some practices can be done solo, others by team, others require users to help.
User involvementFunctional tests and unit testsSimple design & refactoringPair programming
Other Approaches
UML: XP uses it on the whiteboard (if at all)
Rational Unified Process: XP has many fewer roles & documents; XP emphasizes team over artifacts
SCRUM: XP compatible
Who, Us?
And other questions
More Information
Extreme Programming Explained, by Kent Beck
Refactoring, by Martin Fowlerhttp://www.xprogramming.comhttp://c2.com/cgi/wiki?Extreme
ProgrammingRoadmap