Download - Agile Methods and Extreme Programming
![Page 1: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/1.jpg)
Agile Methods and Extreme Programming
CS 414, Software Engineering I
Mark Ardis
Rose-Hulman Institute
December 19, 2002
![Page 2: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/2.jpg)
2
Outline
I. Origin of Agile Methods
II. Examples of Agile Methods
III. Extreme Programming
![Page 3: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/3.jpg)
3
I. Origin of Agile Methods
![Page 4: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/4.jpg)
4
First Cartoon of the Day
![Page 5: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/5.jpg)
5
Spectrum of Methods
Source: "Get ready for agile methods, with care" by Barry Boehm, IEEE Computer, January 2002.
![Page 6: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/6.jpg)
6
Boehm's Risk Exposure Profile
Source: "Get ready for agile methods, with care" by Barry Boehm, IEEE Computer, January 2002.
Black curve: Inadequate plans
Red curve: Market share erosion
![Page 7: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/7.jpg)
7
Safety-Critical Profile
Source: "Get ready for agile methods, with care" by Barry Boehm, IEEE Computer, January 2002.
Black curve: Inadequate plans
Red curve: Market share erosion
![Page 8: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/8.jpg)
8
Agile Profile
Source: "Get ready for agile methods, with care" by Barry Boehm, IEEE Computer, January 2002.
Black curve: Inadequate plans
Red curve: Market share erosion
![Page 9: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/9.jpg)
9
Agile Manifesto
• We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: – Individuals and interactions over processes and tools
– Working software over comprehensive documentation
– Customer collaboration over contract negotiation
– Responding to change over following a plan
• That is, while there is value in the items on the right, we value the items on the left more.
![Page 10: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/10.jpg)
10
II. Examples of Agile Methods
![Page 11: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/11.jpg)
11
The List of Agile Methods
• Adaptive Software Development
• Crystal
• Dynamic System Development Method (DSDM)
• Extreme Programming
• Feature Driven Development (FDD)
• SCRUM
![Page 12: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/12.jpg)
12
Adaptive Software Development
Source: "Retiring lifecycle dinosaurs" by Jim Highsmith, Software Testing and Quality Engineering, July/August 2000
![Page 13: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/13.jpg)
13
Crystal
• "family of human-powered and adaptive, ultralight, 'shrink-to-fit' software development methodologies"
• People-centric
• Reduces bureaucracy to least practical
• Start small and make it smaller
![Page 14: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/14.jpg)
14
Dynamic System Development Method (DSDM)
Source: DSDM website
![Page 15: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/15.jpg)
15
Feature Driven Development (FDD)
• At start of project:– Develop an Overall Model– Build a Features List– Plan by Feature
• Within each iteration:– Design by Feature– Build by Feature
![Page 16: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/16.jpg)
16
SCRUM
Source: SCRUM website
![Page 17: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/17.jpg)
17
III. Extreme Programming
![Page 18: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/18.jpg)
18
Motivation
• Knobs on a control board
• Each knob a practice that works well
• Turn all knobs up to 10
![Page 19: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/19.jpg)
19
Learning to Drive
"Driving is not about getting the car going in the right direction.
Driving is about constantly paying attention, making a little correction this way, a little correction that way."
-- Kent Beck, Extreme Programming Explained
![Page 20: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/20.jpg)
20
Four Values
• Simplicity– create the simplest thing that could work
• Communication– face-to-face, not document-to-face
• Feedback– lots of tests
• Aggressiveness
![Page 21: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/21.jpg)
21
Four Basic Activities
• Coding– cannot do without it
• Testing– if it cannot be tested it doesn't exist
• Listening– to those with domain knowledge
• Designing– to keep the system from decaying
![Page 22: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/22.jpg)
22
Twelve Practices
7. Pair programming
8. Collective ownership
9. Continuous integration
10. 40-hour week
11. On-site customer
12. Coding standards
1. The Planning Game
2. Small releases
3. Metaphor
4. Simple design
5. Testing
6. Refactoring
![Page 23: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/23.jpg)
23
1. The Planning Game
• Business people decide:– scope– priority– release dates
• Technical people decide:– estimates of effort– technical consequences– process– detailed scheduling
![Page 24: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/24.jpg)
24
The Planning Game
• Collect User Stories on cards
• Stories are written by customers
• Stories generate tests
![Page 25: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/25.jpg)
25
Estimating
• Be concrete
• No imposed estimates
• Feedback: compare actuals to estimates
• Re-estimate periodically
![Page 26: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/26.jpg)
26
Scheduling
• Each story gets an estimate of effort
• Customers decide which stories are most important
• Programmers calculate how long each release will take
![Page 27: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/27.jpg)
27
2. Small Releases
• Every release should be as small as possible
• Every release has to completely implement its new features
![Page 28: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/28.jpg)
28
Waterfall to XP Evolution
Source: "Embracing change with extreme programming" by Kent Beck,IEEE Computer, October 1999.
![Page 29: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/29.jpg)
29
3. Metaphor
• Each XP project has its own metaphor– naive– system is a spreadsheet
• Metaphor replaces architecture as the view from 10,000 feet
![Page 30: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/30.jpg)
30
4. Simple Design
• Runs all the tests
• Has no duplicated logic
• States every intention important to programmers
• Has the fewest possible classes and methods
![Page 31: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/31.jpg)
31
5. Testing
• Any feature without an automated test does not exist.
• Programmers need confidence in correct operation
• Customers need confidence in correct operation
![Page 32: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/32.jpg)
32
Tools for Testing
• Test harnesses for various programming languages
• Simplify job of creating and running the tests
![Page 33: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/33.jpg)
33
6. Refactoring
• Always ask if there is a way to make the program simpler
• When the system requires duplication of code, it is asking for refactoring
• Can always find a series of small, low-risk steps
![Page 34: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/34.jpg)
34
Second Cartoon of the Day
![Page 35: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/35.jpg)
35
7. Pair Programming
• All code written with 2 people at one machine
• Driver:– thinks about best way to implement
• Passenger:– thinks about viability of whole approach– thinks of new tests– thinks of simpler ways
![Page 36: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/36.jpg)
36
Workspace
![Page 37: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/37.jpg)
37
8. Collective Ownership
• Anybody who sees an opportunity to add value to any portion of the code is required to do so
• Everyone knows something about everything
• Everyone feels obligated to make improvements
![Page 38: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/38.jpg)
38
9. Continuous Integration
• Integrate and test every few hours, at least once per day
• All tests must pass
• Easy to tell who broke the code
![Page 39: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/39.jpg)
39
10. 40-Hour Week
• People should be fresh and eager every morning
• Overtime is a symptom of a serious problem
• XP only allows one week of overtime
![Page 40: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/40.jpg)
40
11. On-Site Customer
• Real customer will use the finished system
• Programmers need to ask questions of a real customer
• Customer can get some other work done while sitting with programmers
![Page 41: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/41.jpg)
41
12. Coding Standards
• Everyone edits everyone's code
• Standard should require least amount of overhead
• Standard should be adopted voluntarily by the team
![Page 42: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/42.jpg)
42
How could this work?
![Page 43: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/43.jpg)
43
1. The Planning Game
• You couldn't start with only a rough plan
• Unless:– customers did updating based on
estimates of programmers– short releases (2) revealed any mistakes in
plan– customer was sitting with programmers
(11) to spot trouble
![Page 44: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/44.jpg)
44
2. Small Releases
• You couldn't release new versions so quickly
• Unless:– the Planning Game (1) helped work on the
most valuable stories– you were integrating continuously (9)– testing (5) reduced defect rate
![Page 45: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/45.jpg)
45
3. Metaphor
• You couldn't start with just a metaphor
• Unless:– you got feedback on whether metaphor
was working– your customer was comfortable talking
about the system in terms of the metaphor– you refactored continually (6) to refine
understanding
![Page 46: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/46.jpg)
46
4. Simple Design
• You couldn't have just enough design for today
• Unless:– you were used to refactoring (6)– you had a clear overall metaphor (3)– you were programming with a partner (7)
![Page 47: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/47.jpg)
47
5. Testing
• You couldn't write all those tests
• Unless:– the design was as simple as possible (4)– you were programming with a partner (7)– you felt good seeing all those tests running– your customer felt good seeing all those
tests running
![Page 48: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/48.jpg)
48
6. Refactoring
• You couldn't refactor the design all the time• Unless:
– you were used to collective ownership (8)– you had coding standards (12)– you programmed in pairs (7)– you had a simple design (4)– you had enough tests (5)– you had continuous integration (9)– you were rested (10)
![Page 49: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/49.jpg)
49
7. Pair Programming
• You couldn't write all the code in pairs• Unless:
– coding standards (12) reduced picayune squabbles
– everyone were fresh and rested (10)– the pairs wrote tests together (7)– the pairs had a metaphor (3) to ground their
decisions– the pairs were working within a simple design (4)
![Page 50: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/50.jpg)
50
8. Collective Ownership
• You couldn't have everyone changing everything
• Unless:– you integrated after a short time (9)– you had enough tests (5)– you programmed in pairs (7)– you adhered to coding standards (12)
![Page 51: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/51.jpg)
51
9. Continuous Integration
• You couldn't integrate every few hours
• Unless:– you could run tests quickly (5)– you programmed in pairs (7)– you refactored (6)
![Page 52: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/52.jpg)
52
10. 40-Hour Week
• You couldn't work only 40 hours/week
• Unless:– the Planning Game (1) were choosing the
most important work to do– you had enough tests (5) to avoid nasty
surprises– you were working at top speed already
![Page 53: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/53.jpg)
53
11. On-Site Customer
• You couldn't have a real customer sitting by the programmers full-time
• Unless:– they could produce value by writing
functional tests– they could produce value by making small-
scale priority and scope decisions
![Page 54: Agile Methods and Extreme Programming](https://reader036.vdocuments.net/reader036/viewer/2022081420/56814e91550346895dbc3a85/html5/thumbnails/54.jpg)
54
12. Coding Standards
• You couldn't get everyone to use the same coding standard
• Unless:– they were part of a winning team by
practicing XP