540 likes | 750 Views
Coding Dojo. Agile Riga Day 2012 Johannes Brodwall , Principal Architect Steria Norway @ jhannes. Motivation. Master programming. through practice. What is TDD for you ?. What do you want to get out of the day ?. How do you want to apply this on Monday ?. Agenda.
E N D
CodingDojo Agile Riga Day 2012 Johannes Brodwall, Principal Architect Steria Norway @jhannes
What is TDD for you? What do youwant to getoutoftheday? How do youwant to applythisonMonday?
10:05: Demo of TDD and pair programming 10:20: Codingdojo 1: Prime numbers 11:20: Retrospective 11:30: Codingdojo 2: (Romans ifyou’reslow, Yahtzee ifyou’requick, minesweeper ifyou’re smart) 12:30: Lunch 13:15: Retrospective 13:45: Break (???!)! 14:00: Extreme startup 15:30: Retrospective
TDD No codewithout test Just enough test to red Just enoughcode to green (+ refactor!)
Ping/pong Driver/Navigator
Kata: Prime factors 1 => [] 2 => [2] 3 => [3] 4 => [2,2] … 2*2*13*17*23*23 => [2,2,13,17,23,23]
How didyourchoiceoflanguagehelp/hurt? Didyouchange drivers at goodfrequency? What tests didyou start with? Which tests didn’thelpyou? How didyoudeterminenext test? How didthesolution end up looking?
Whatsurprisedyou? Whatdidyoulearn? What do youwant to achievenextround?
Given: var minefield = new Minefield([ "....", ".*..", ".*.*", "...*“ ])
How didyourchoiceoflanguagehelp/hurt? Didyouchange drivers at goodfrequency? What tests didyou start with? Which tests didn’thelpyou? How didyoudeterminenext test? How didtheboundaryconditionsaffectyour test and code?
Whatsurprisedyou? Whatdidyoulearn? What do youwant to achievenextround?
Kata: Yahtzee ({1,1,1,1,1}, «ones»} => 5 ({1,1,1,1,1}, «sixes»} => 0 ({1,1,1,1,1}, «yahtzee»} => 50 Ones, twos, threes, fours, fives, sixes Pair, two pairs, threeof a kind, fourof a kind, full house Yahtzee Little straight, big straight Chance
How didyourchoiceoflanguagehelp/hurt? Didyouchange drivers at goodfrequency? What tests didyou start with? Which tests didn’thelpyou? How didyoudeterminenext test? What is ({2,2,3,6,6}, «pair»)?
Whatsurprisedyou? Whatdidyoulearn? What do youwant to achievenextround?
Kata: Romans 1 => I 5 => V 1999 => MCMXCIX
How didyourchoiceoflanguagehelp/hurt? Didyouchange drivers at goodfrequency? What tests didyou start with? Which tests didn’thelpyou? How didyoudeterminenext test? How didyouimplementrules for «IV» etc?
Whatsurprisedyou? Whatdidyoulearn? What do youwant to achievenextround?
The Extremestartupcodecompetition By Matt Wynne and Robert Chatly
Orientation Download starting point (http://github.com/steria/extreme_startup_servers) Start server Register (http://192.168.11.182:3000/) Solvequestions
Rules Cheat like mad! Onlyresults matter No destructionofproperty Obeylocallaws Don’t f$%! withworkshop computer
Guidelines Work as you like (Tip: Use a languageyou know) Helpthosebehind Uploadyourcode (ifpossible)
Orientation Download starting point (http://github.com/steria/extreme_startup_servers) Start server Register (http://192.168.11.182:3000/) Solvequestions
Round 1 (fight!)
Testing? Teamwork?
Round 2 (fight!)
Testing? Howdidyou mess up? Howdidyoucheat? Whichquestionsdidyousolve? Annoyingquestions? Teamwork?
Whatsurprisedyou? Whatdidyoulearn? Whatwillyou do different in thefuture?