Xtreme Programming – Workshop
Agile Development
What is Agile?
Manifesto
Agile Methodologies
● Scrum
● Xtreme
● Kanban
● Lean
Xtreme Programming
It works towards a continuously improving, high quality product which can
respond to changes in customer requirements.
Core Practices:
1. Pair Programming
2. Test Driven Development (TDD)
3. Continuos Integration (CI)
4. Small Releases
Pair Programming
Pair Programming
What is pairing?What is pairing?
● Two developer working on a single
task.
● One person coding (Driver) 
Other reviewing it (Observer or Navigator)
● Switching roles frequently.
Why Pairing?
● Different ideas sharing and brainstorming while pairing. - Leads to better design
● Trivial issues don’t frustrate anymore
● Collective ownership
● Better team building
● Faster knowledge transfer and new member ramp-ups
● Learn from each other (learn from expert with hands-on)
● Continuous code review
● Getting things done in less time
Pairing Styles/Anti Patterns
Pairing stylesPairing styles
➢ Ping Pong
➢ Driver/Navigator
Anti PatternsAnti Patterns
➢ Superman
➢ Back-seat Driver
➢ The King of Shortcuts
Pair rotation techniques
● Egg Timer / Chess Clock
➔ Encourages rotation of roles within a pair
➔ Driver/Navigator swapping
● Code Pairing hours
● Pair Stair
➔ Encourages working with everybody
Pairing - Stats
Pairing Smells!
● Lots of defects even after pairing
● Distractions while pairing
● Meeting or Huddles
● Personal phone calls
● Too many tea/coffee breaks
Test Driven Development
Unit Testing
● Keeps you out of the debugger
● Reduces bugs
● Encourages refactoring
● Reduces fear of breaking
● Reduces cost of change
Good unit tests!!?
● Can be run in any order if part of many other tests
● Runs in memory (no DB or File access, for example)
● Consistently returns the same result
● Tests a single logical concept in the system
● Readable & Maintainable
TDD
Why TDD
● Forces good design
● Forces your design to be testable – Low coupling
● Encourages solutions to be simple – KISS, DRY
● Testing thoroughness
Philosophy
● YAGNI (You Aren’t Going to Need It)
● KISS (Keep It Simple Stupid)
● DRY (Don’t Repeat Yourself)
● LDUF (Little Design Up Front)
Any problems !?
TDD is not perfect, here are some things to remember
● Testing first does not mean you are testing well
● Indeterminate code can be hard to test
● Always get a pair to review your test cases
● Remember to keep your tests as clean as your production
code
CI & CD

Xtreme Programming

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
    Agile Methodologies ● Scrum ●Xtreme ● Kanban ● Lean
  • 6.
    Xtreme Programming It workstowards a continuously improving, high quality product which can respond to changes in customer requirements. Core Practices: 1. Pair Programming 2. Test Driven Development (TDD) 3. Continuos Integration (CI) 4. Small Releases
  • 7.
  • 8.
    Pair Programming What ispairing?What is pairing? ● Two developer working on a single task. ● One person coding (Driver)  Other reviewing it (Observer or Navigator) ● Switching roles frequently.
  • 9.
    Why Pairing? ● Differentideas sharing and brainstorming while pairing. - Leads to better design ● Trivial issues don’t frustrate anymore ● Collective ownership ● Better team building ● Faster knowledge transfer and new member ramp-ups ● Learn from each other (learn from expert with hands-on) ● Continuous code review ● Getting things done in less time
  • 10.
    Pairing Styles/Anti Patterns PairingstylesPairing styles ➢ Ping Pong ➢ Driver/Navigator Anti PatternsAnti Patterns ➢ Superman ➢ Back-seat Driver ➢ The King of Shortcuts
  • 11.
    Pair rotation techniques ●Egg Timer / Chess Clock ➔ Encourages rotation of roles within a pair ➔ Driver/Navigator swapping ● Code Pairing hours ● Pair Stair ➔ Encourages working with everybody
  • 12.
  • 13.
    Pairing Smells! ● Lotsof defects even after pairing ● Distractions while pairing ● Meeting or Huddles ● Personal phone calls ● Too many tea/coffee breaks
  • 14.
  • 15.
    Unit Testing ● Keepsyou out of the debugger ● Reduces bugs ● Encourages refactoring ● Reduces fear of breaking ● Reduces cost of change
  • 16.
    Good unit tests!!? ●Can be run in any order if part of many other tests ● Runs in memory (no DB or File access, for example) ● Consistently returns the same result ● Tests a single logical concept in the system ● Readable & Maintainable
  • 17.
  • 18.
    Why TDD ● Forcesgood design ● Forces your design to be testable – Low coupling ● Encourages solutions to be simple – KISS, DRY ● Testing thoroughness
  • 19.
    Philosophy ● YAGNI (YouAren’t Going to Need It) ● KISS (Keep It Simple Stupid) ● DRY (Don’t Repeat Yourself) ● LDUF (Little Design Up Front)
  • 20.
    Any problems !? TDDis not perfect, here are some things to remember ● Testing first does not mean you are testing well ● Indeterminate code can be hard to test ● Always get a pair to review your test cases ● Remember to keep your tests as clean as your production code
  • 21.