21
Introduction to Extreme Programming William C. Wake [email protected] 2-2-2000

Introduction to Extreme Programming

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

Page 1: Introduction to Extreme Programming

Introduction toExtreme Programming

William C. [email protected]

Page 2: Introduction to Extreme Programming

XP is...

A lightweight developmentmethodology that emphasizes: ongoing user involvement testing pay-as-you-go design

Page 3: Introduction to Extreme Programming

Background: Cost of Changes

t

$

t

$

“Then” (exponential) “Now” (flattened)

Page 4: Introduction to Extreme Programming

Background: Cost of Money

t

$“Up-front design”

“Pay as you go”

$$

Page 5: Introduction to Extreme Programming

XP Principles

Rapid feedbackAssume simplicityIncremental changeEmbrace ChangeQuality Work

Page 6: Introduction to Extreme Programming

XP Practices

Planning GameMetaphorTestsRefactoring Pair programming

Small releases

Simple designCollective

ownershipContinuous

integrationOpen workspace40-hour week

Page 7: Introduction to Extreme Programming

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.

Page 8: Introduction to Extreme Programming

The XP Cycle (in the small)

analysis

test

code

design

Page 9: Introduction to Extreme Programming

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

Page 10: Introduction to Extreme Programming

Planning Game

Users write storiesDevelopers estimate themUsers split, merge, & prioritizePlan overall release (loosely) and the

next iteration

Page 11: Introduction to Extreme Programming

Tests

Functional TestsUnit Tests

Page 12: Introduction to Extreme Programming

Functional Tests

Specified by the userImplemented by users, developers,

and/or test teamAutomatedRun at least dailyPart of the specification

Page 13: Introduction to Extreme Programming

Unit Tests

Written by developersWritten before and after codingAlways run at 100%Support design, coding, refactoring,

and quality.

Page 14: Introduction to Extreme Programming

Test Metrics

Tests failed

Tests passed

1 2 3 4 5 6 7

Key:

Page 15: Introduction to Extreme Programming

Design

Pay as you goSpike when necessary“You aren’t gonna need it”“Simplest thing that could possibly

work”“Once And Only Once”

Page 16: Introduction to Extreme Programming

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”

Page 17: Introduction to Extreme Programming

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();

Page 18: Introduction to Extreme Programming

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

Page 19: Introduction to Extreme 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

Page 20: Introduction to Extreme Programming

Who, Us?

And other questions

Page 21: Introduction to Extreme Programming

More Information

Extreme Programming Explained, by Kent Beck

Refactoring, by Martin Fowlerhttp://www.xprogramming.comhttp://c2.com/cgi/wiki?Extreme

ProgrammingRoadmap