TDD & PP Workshop for Sterias FHS og T&D team, 9. desember, 2010 Johannes Brodwall Anders Karlsen
TODO: MAKE NICE Intro 10m Prep: Fizzbuzz (UncleBobs regler) – 25m Dojo: Yahtzee 45m Prep: Tennis (Johannes regler: Enklest test, enklest kode,kode guider test) – 35m Lunsj – 60m 20m lean vs agile Dojo: Poker 90m 13:50 Legacy demonstrasjon Diskusjon
Lean vs Agile
LeanAgile By invitationIncluding DesigningDoing Feed forwardFeedback High throughputLow latency PlannedReactive/adaptive Create models of the worldShare models of the world ProcessPeople Manage complex problems StandardizeInspect and adapt
Test-driven development
Uncle Bob’s Rules No code without test Only enough test for red Only enough code for green
Demo: FizzBuzz
What to watch for
How we interact How we use Eclipse The design of the code The design of the tests Refactorings
What did you notice?
Code dojo: Yahtzee
Test-driven development (recap)
Uncle Bob’s Rules No code without test Only enough test for red Only enough code for green
Test-driven design
Johannes’s Rules Test for simplest structure Implement simplest structure Use limitations in code to guide next test Refactor all the time
Johannes’s Rules Test for simplest structure Implement simplest structure Use limitations in code to guide next test
Demo: Tennis
Code dojo: Poker hands
High card Pair Two pair Three of a kind Straight Flush Full house Four of a kind Straight flush
Real world testing
Rules Arrange Act Assert
Demo: Legacy code
Recap Uncle Bob’s rules Johannes’s rules Arrange-act-assert
Working together Scrum board with magnets Rotate pairs daily Pair programming star
Open discussion
Takk for oppmerksomheten twitter.com/jhannes twitter.com/anderskar