Coding Dojo Sofware People 2012 Johannes Brodwall Principal
Coding Dojo Sofware People 2012 Johannes Brodwall, Principal Architect Steria Norway @jhannes
Guest starring Dmytro Mindra
Moscow Coding Dojo? http: //johannesbrodwall. com/2011/12/18 /how-to-start-a-coding-dojo/
Motivation
Master programming
through practice
What does good programming mean for you? What do you want to get out of the day? How do you want to apply this on Monday?
Agenda
• • • 10: Demo of TDD and pair programming 10: 20: Randori style Leap Years kata with everyone 10: 40: Two groups, randori style Prime Factors 11: 10: Retrospective 11: 30: Two groups, randori style Prime Factors, take 2 12: 00: Coding dojo 2: Romans if you’re slow, Yahtzee if you’re quick, minesweeper if you’re smart 13: 00 – break in the middle 13: 45: Retrospective 14: 00: Lunch 15: 00: Extreme startup 16: 30: Break 17: 15: Wrap-up
TDD
TDD No code without test Just enough test to red Just enough code to green (+ refactor!)
Pair programming
Ping/pong Driver/Navigator
Failing test Write code Failing test
Failing test Write code Refactor code and tests Failing test
What benefits can you get from pair programming?
Kata 0: Leap Year
Kata 1: Prime factors
Kata: Prime factors 1 => [] 2 => [2] 3 => [3] 4 => [2, 2] … 2*2*13*17*23*23 => [2, 2, 13, 17, 23]
How did your choice of language help/hurt? What tests did you start with? Which tests didn’t help you? Did you change drivers at good frequency? How did you determine next test? How did the solution end up looking?
What surprised you? What did you learn? What do you want to achieve next round?
Kata 2 a: Minesweeper
Given: var minefield = new Minefield([ ". . ", ". *. *", ". . . *“ ])
What surprised you? What did you learn? What do you want to achieve next round?
How did your choice of language help/hurt? What tests did you start with? Which tests didn’t help you? Did you change drivers at good frequency? How did you determine next test? How did the boundary conditions affect your test and code?
Kata 2 b: Yahtzee
Kata: Yahtzee ({1, 1, 1}, «ones» } => 5 ({1, 1, 1}, «sixes» } => 0 ({1, 1, 1}, «yahtzee» } => 50 Ones, twos, threes, fours, fives, sixes Pair, two pairs, three of a kind, four of a kind, full house Yahtzee Little straight, big straight Chance
What surprised you? What did you learn? What do you want to achieve next round?
How did your choice of language help/hurt? What tests did you start with? Which tests didn’t help you? Did you change drivers at good frequency? How did you determine next test? What is ({2, 2, 3, 6, 6}, «pair» )?
Kata 2 c: Romans
Kata: Romans 1 => I 5 => V 1999 => MCMXCIX
What surprised you? What did you learn? What do you want to achieve next round?
How did your choice of language help/hurt? What tests did you start with? Which tests didn’t help you? Did you change drivers at good frequency? How did you determine next test? How did you implement rules for «IV» etc?
Extreme startup
The Extreme startup code competition 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/) Solve questions
Rules Cheat like mad! Only results matter No destruction of property Obey local laws Don’t f$%! with workshop computer
Guidelines Work as you like (Tip: Use a language you know) Help those behind Upload your code (if possible)
Orientation Download starting point (http: //github. com/steria/extreme_startup_servers) Start server Register (http: //192. 168. 11. 182: 3000/) Solve questions
Form teams!
Round 1
Round 1 (fight!)
Round 1: Retrospective
What surprised you? What did you learn? What do you want to achieve next round?
Round 2
Round 2 (fight!)
Round 2: Retrospective
Retrospective
What surprised you? What did you learn? How will you change how you work?
Testing? How did you mess up? How did you cheat? Which questions did you solve? Annoying questions? Teamwork?
Thank you johannes. brodwall@steria. no http: //johannesbrodwall. com http: //twitter. com/jhannes
- Slides: 56