6. 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
8. 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.
9. 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
10. Pairing Styles/Anti Patterns
Pairing stylesPairing 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
13. Pairing Smells!
● Lots of defects even after pairing
● Distractions while pairing
● Meeting or Huddles
● Personal phone calls
● Too many tea/coffee breaks
15. Unit Testing
● Keeps you 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
18. Why TDD
● Forces good design
● Forces your design to be testable – Low coupling
● Encourages solutions to be simple – KISS, DRY
● Testing thoroughness
19. Philosophy
● YAGNI (You Aren’t Going to Need It)
● KISS (Keep It Simple Stupid)
● DRY (Don’t Repeat Yourself)
● LDUF (Little Design Up Front)
20. 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