Extreme Programming - PowerPoint PPT Presentation

About This Presentation
Title:

Extreme Programming

Description:

Test - specification Bug - new testcase Acceptance T.: ... { super(name); } } What's the first testcase? The ... From Extreme Programming Explained: ... – PowerPoint PPT presentation

Number of Views:136
Avg rating:3.0/5.0
Slides: 26
Provided by: tum89
Category:

less

Transcript and Presenter's Notes

Title: Extreme Programming


1
Extreme Programming
XP
EXTREME PROGRAMMING
Joint Advanced Student School (JASS)
2
Outline
  • What is XP?
  • Motivation
  • XP values
  • XP features
  • Rules and practices of XP
  • Example Pair Programming
  • Conclusion
  • Experiment Pair Drawing

3
What is XP?
  • A system of practices that a community of
    software developers is evolving to address the
    problems of quickly delivering quality software,
    and then evolving it to meet changing business
    needs.

4
Extreme?
5
Motivation
  • Why do we need XP?
  • Common problems of software development
  • Schedule slips
  • Business misunderstood
  • Defect rate
  • Management
  • Motivation of developers
  • XP solutions
  • Short iterations, fast delivery
  • Whole team
  • Test driven development
  • Shared understanding
  • Humanity and productivity

6
Motivation
  • Economics of Software Development

Classic approach
XP approach
Cost of change
Cost of change
Requirements Analysis Design Implementation Te
sting Production
Time
Time
Iterations
7
XP values
Communication
  • Courage

Simplicity
Feedback
8
XP features
  • XP is the most suitable for
  • Small and medium size projects
  • New technologies
  • Projects with unclear requirements
  • Risky projects
  • XP improves skills by cross training
  • No more than 20 developers in a team
  • Using of XP in life-critical projects is
    questionable

9
Rules and practices
Planning
Designing
Extreme Programming
Coding
Testing
http//www.extremeprogramming.org
10
The planning game
Business
Desired features
Business
User stories
Development
Estimate stories
Determine Project Velocity
Development
Business
Prioritize
Business
Plan overall release Plan next iteration
Development
11
Designing
Always use the simplest possible design that
gets the job done. K.I.S.S. - Keep It Short
and Simple
Ongoing redesign of software to improve
responsiveness to change
  • Simplicity
  • System metaphor
  • Spike solution
  • Refactoring

12
Coding
Code must be written to agreed standards. Java
Naming Conventions Classes Node, Reader,
AssignableVariable Variables node, reader,
variable Member variables m_imageSource,
m_reader Methods append(), getSource(),
deleteIfEmpty() Mutator Methods
setToyOwner(String ownerName)
Any developer can change any line of code to add
functionality, fix bugs, or refactor.
  • On-site customer
  • Collective ownership
  • Pair programming
  • Coding standards
  • No overtime

40-Hour Work Week Programmers go home on time.
13
Testing
  • Extreme testing?
  • Code test first
  • Unit tests
  • Acceptance tests

Testcase is the specification
14
Pair Programming
Example
15
Example
What is our task?
How do we calculate that?
And how?
Nice, so lets start with creating a 'customer'
class.
We have to calculate the fee for the rented DVDs.
The price depends on the number of days that you
rent a DVD.
Let me see... Our cards says, that regular movies
are 2EUR for 2 days. After the third day it's
1.5EUR per day.
Wait! Let us write a testcase for it...
16
Example
public class CustomerTest extendsjunit.framework.
TestCase public CustomerTest(String name)
super(name)
17
Example
The best thing is, that we write a
testcase-method testRentingOneMovie, which checks
the renting-fee for the movie. The framework
looks for all methods that begin with 'test' and
runs them.
What's the first testcase?
And how?
And where do we put the testcode?
Good, let's write down what we have so far.
First we need a customer. And then we act like we
have all the methods that we'd like to have.
That's easy )
The simplest thing to start is renting one movie.
For every method we write asserts to assure that
it is working.
Right. We rent a DVD for one day and the fee
should be 2 EUR.
18
Example
public class CustomerTest... public void
testRentingOneMovie() Customer customer
new Customer() customer.rentMovie(1)
assertTrue(customer.getTotalCharge() 2)
19
Example
Ok. You want me to make this test running and
forget everything else for the moment.
That's also easy )
Exactly. What would you do, if you only had to
implement this single test?
20
Example
public class Customer public void
rentMovie(int daysRented) public int
getTotalCharge() return 2
How extreme... But good ) Test a bit, code a
bit, test a bit more
21
Example
public class CustomerTest... public void
testRentingTwoMovies() Customer customer
new Customer() customer.rentMovie(1)
customer.rentMovie(2) assertEquals(4,
customer.getTotalCharge())
22
Example
public class Customer private int totalCharge
0 public void rentMovie(int daysRented)
totalCharge 2 public int
getTotalCharge() return totalCharge
23
Conclusion
What you should take with you now
  • Communicate intensively
  • Test a bit, code a bit, test a bit more
  • Keep the design simple
  • Refactor
  • Enjoy having a safety net when refactoring

24
Have fun and thank you!
25
Experiment Pair Drawing
  • How did you feel when you were drawing solo vs.
    in a pair?
  • Which of the drawings are more artistic /
    original?
  • Did you find yourself concentrating more or less
    during pairing?
  • Was it more fun to draw alone or in a pair?
  • What did you like and what didnt you like about
    drawing alone or in a pair?
  • http//industriallogic.com/games/pairdraw.html
Write a Comment
User Comments (0)
About PowerShow.com