KEMBAR78
xTreme Programming by Sejo Ćesić and Enis Zeherović | PDF
XP?
eXtreme Programming
Sejo Ćesić
sejo@agile.ba
be.linkedin.com/in/sejocesic/
Enis Zeherović
enis@agile.ba
ba.linkedin.com/in/eniszeherovic
eXtreme Programming
 Formulated in 1999 by Kent Beck, Ward
Cunningham and Ron Jeffries
 AGILE software development
methodology
 Developed in reaction to high ceremony
methodologies (e.g. Rational Unified
Process - RUP)
XP Goal
Organize people
to produce
higher-quality software
more productively
XP Activities
 Coding
 Testing
 Listening
 Designing
XP Values
 Communication
 Simplicity (YAGNI)
 Feedback
"Optimism is an occupational hazard of programming.
Feedback is the treatment.“
 Courage
refactor/remove code, be persistent
 Respect
XP Practices
1. Pair programming
2. Planning game
3. Test driven development
4. Whole team - customer is in the team
5. Continuous process (integration, refactoring,
small releases)
6. Shared understanding (coding, collective
ownership, simple design)
7. Sustainable pace
Pair programming
Pair programming
Driver & Navigator metaphor improving:
- Economics
Errors avoided, zero cost to fix them later
- Design quality
Second opinion constantly questioning yours
- Satisfaction - Great confidence in code
- Learning - Constant exchange of knowledge
- Team building - Communication improves
exponentially
Resistance to XP
 2 programmers cost 2 times more than 1
programmer!
 Place full of people never shutting their mouth
will drive you insane!
 When do I get to surf the web? Or chat online?
Resistance to XP (cont.)
 Mistakes of a single person cost much much
more!
 Once you are working with your pair, you don't
hear anyone else anymore.
In fact, smart manager knows:
No noise -> something is wrong!
Planning game
Planning game
 Release plan
 Iteration plan
 Acceptance test
 Stand Up Meeting
 Pair Negotiation
 Unit Test
 Pair Programming
Planning game
Burndown and velocity
 How much work is getting done on your project?
 Burndown keeps track of iteration progres
 Calculate velocity on the end of iteration
=(estimated hours - remaining hours) / nr. of
days
PG - Burndown and velocity
Test driven development
… will be presented soon
Whole team
Customer is “on site” and used for:
 writing user stories
 release and iteration planning
 complete programming tasks
 functional testing
Alternative: “proxy customer”
Continuous process
 Continuous integration
 Design improvement, refactorings
 Small releases, shippable products,
demonstration per iteration
Shared understanding
 Coding standard
 Collective code ownership
 Simple design
 System metaphor
Sustainable pace
 Frequent code merge
&
always executable
&
test covered high quality code
---> fresh and alert minds
 40 hours week
Test driven development
Test driven development
 Add a test
 Run all tests and see if the new one fails
 Write some code
 Run tests
 Refactor code
 Repeat
Test driven development
Test driven development
Apply F.I.R.S.T. properties of unit tests:
Fast
many hundreds or thousands per second
Isolates
failure reason become obvious
Repeatable
run repeatedly in any order any time
Self-validating
no manual evaluation required
Timely
written before the code
Test driven development
 One assert per test
 Descriptive names of tests
 Test code is important as production code
(maybe more)
 Recognize test code as documentation you are
always missing
 The quality of a test is how good it points you
on the failure in your system if it fails
TDD - practical introduction
Two parts:
 Java TDD Kata in Eclipse
 User interface TDD testing
TDD Kata
 String Calculator:
 Set of requirements
 Develop one task at a time
 Test only positive cases
TDD Kata – String Calculator
 Requirements:
1. Empty string returns zero
2. String with single digit returns that digit
3. String with 2 digits separated with a ‘,‘
retuns sum of these 2 numbers ()
4. Unknown number of digits separated by ‘,‘
must be possible
5. A new line can be used as a separator
6. Custom delimiter must be supported
(//[delimiter]n[numbers])
User interface TDD testing
 New page development in TDD
 Tools: Eclipse, Selenium, TestNG
 Free tool: testeditor.org
Q&A
THANK YOU

xTreme Programming by Sejo Ćesić and Enis Zeherović

  • 1.
  • 2.
    eXtreme Programming Sejo Ćesić sejo@agile.ba be.linkedin.com/in/sejocesic/ EnisZeherović enis@agile.ba ba.linkedin.com/in/eniszeherovic
  • 3.
    eXtreme Programming  Formulatedin 1999 by Kent Beck, Ward Cunningham and Ron Jeffries  AGILE software development methodology  Developed in reaction to high ceremony methodologies (e.g. Rational Unified Process - RUP)
  • 4.
    XP Goal Organize people toproduce higher-quality software more productively
  • 5.
    XP Activities  Coding Testing  Listening  Designing
  • 6.
    XP Values  Communication Simplicity (YAGNI)  Feedback "Optimism is an occupational hazard of programming. Feedback is the treatment.“  Courage refactor/remove code, be persistent  Respect
  • 7.
    XP Practices 1. Pairprogramming 2. Planning game 3. Test driven development 4. Whole team - customer is in the team 5. Continuous process (integration, refactoring, small releases) 6. Shared understanding (coding, collective ownership, simple design) 7. Sustainable pace
  • 8.
  • 9.
    Pair programming Driver &Navigator metaphor improving: - Economics Errors avoided, zero cost to fix them later - Design quality Second opinion constantly questioning yours - Satisfaction - Great confidence in code - Learning - Constant exchange of knowledge - Team building - Communication improves exponentially
  • 10.
    Resistance to XP 2 programmers cost 2 times more than 1 programmer!  Place full of people never shutting their mouth will drive you insane!  When do I get to surf the web? Or chat online?
  • 11.
    Resistance to XP(cont.)  Mistakes of a single person cost much much more!  Once you are working with your pair, you don't hear anyone else anymore. In fact, smart manager knows: No noise -> something is wrong!
  • 12.
  • 13.
    Planning game  Releaseplan  Iteration plan  Acceptance test  Stand Up Meeting  Pair Negotiation  Unit Test  Pair Programming
  • 14.
  • 15.
    Burndown and velocity How much work is getting done on your project?  Burndown keeps track of iteration progres  Calculate velocity on the end of iteration =(estimated hours - remaining hours) / nr. of days
  • 16.
    PG - Burndownand velocity
  • 17.
    Test driven development …will be presented soon
  • 18.
    Whole team Customer is“on site” and used for:  writing user stories  release and iteration planning  complete programming tasks  functional testing Alternative: “proxy customer”
  • 19.
    Continuous process  Continuousintegration  Design improvement, refactorings  Small releases, shippable products, demonstration per iteration
  • 20.
    Shared understanding  Codingstandard  Collective code ownership  Simple design  System metaphor
  • 21.
    Sustainable pace  Frequentcode merge & always executable & test covered high quality code ---> fresh and alert minds  40 hours week
  • 23.
  • 24.
    Test driven development Add a test  Run all tests and see if the new one fails  Write some code  Run tests  Refactor code  Repeat
  • 25.
  • 26.
    Test driven development ApplyF.I.R.S.T. properties of unit tests: Fast many hundreds or thousands per second Isolates failure reason become obvious Repeatable run repeatedly in any order any time Self-validating no manual evaluation required Timely written before the code
  • 27.
    Test driven development One assert per test  Descriptive names of tests  Test code is important as production code (maybe more)  Recognize test code as documentation you are always missing  The quality of a test is how good it points you on the failure in your system if it fails
  • 28.
    TDD - practicalintroduction Two parts:  Java TDD Kata in Eclipse  User interface TDD testing
  • 29.
    TDD Kata  StringCalculator:  Set of requirements  Develop one task at a time  Test only positive cases
  • 30.
    TDD Kata –String Calculator  Requirements: 1. Empty string returns zero 2. String with single digit returns that digit 3. String with 2 digits separated with a ‘,‘ retuns sum of these 2 numbers () 4. Unknown number of digits separated by ‘,‘ must be possible 5. A new line can be used as a separator 6. Custom delimiter must be supported (//[delimiter]n[numbers])
  • 31.
    User interface TDDtesting  New page development in TDD  Tools: Eclipse, Selenium, TestNG  Free tool: testeditor.org
  • 32.
  • 33.