Ivan Lombardi [email protected]
@ivanlombardib
tddrefactoringpair progamming
“Test-driven development (TDD), a proven set of techniques that encourage simple designs and test suites that inspire confidence”
Kent Beck
“Test-driven development is a way of managing fear during programming”
Kent Beck
Fast feedback
Emergent / simple design
Requirements nailed down
Non regression test suite
Always up to date code documentation
why?
Add a little test
Run all tests and fail
Make the simplest change to succeed
Run all tests and succeed
Refactor
how?
Changing a software system without altering the external behavior of the code
“In essence when you refactor you are improving the design of the code after it has been written”
Martin Fowler
Passes the testsReveals intentionNo duplicationFewest elements
Beck’s 4 rules of simple design
Continuous feedback / exchangeMore focusLess frustrationHigher quality fighting poor practicesLess bugsCollective code ownership… and it’s fun!
Why?
Side by side in front of the monitorSwitch role oftenCommunicateAppropriate workspace layout
How?
String Calculator
● focus on the journey● improve your tdd skills● no fear to fail
Today’s kata
and now…Let’s start coding!!!
Extreme Programming Explained (Edition 2) - Kent Beck
http://www.extremeprogramming.org/
Test Driven Development By Example - Kent Beck
Refactoring - Martin Fowler
http://refactoring.com/
Resources