Share
Embed
Perth Code Dojo 12
William Webster
July 28, 2015
Transcript
19 slides
-
Code Dojo Format A Coding Dojo is a coding session
centered around a programming challenge. The dojo provides a safe place to learn and experiment away from the pressures of business delivery. All programmers of varying skill levels meet as equals to learn and share. -
Software Craftsmanship “Deliberate practice is closely related to the attained
level of performance of many types of experts” - Dr. K. Anders Ericsson 10,000 hrs rule - Malcolm Gladwell -
Pomodoro ➔Pomodoro Technique ◆ 25 mins on, 5 mins off
➔Focused work ➔Short break -
Polite Notice Please respect each others commitment. During a Pomodoro.
➔No Email ➔Mobile phones ➔Etc. -
Have Fun! ➔Drinks are available - help yourselves ➔Toilets are
at the back ➔Doors may be locked -
TDD as if you meant it! 1. Write exactly ONE
failing test 2. Make the test from (1) pass by first writing implementation code IN THE TEST 3. Create a new implementation method/function by: a. doing extract method on implementation code created as per (2), or b. moving implementation code as per (2) into an existing implementation method 4. Only ever create new methods IN THE TEST CLASS 5. Only ever create implementation classes to provide a destination for extracting a method created as per (4). 6. Populate implementation classes by doing move method from a test class into them 7. Refactor as required 8. Go to (1) -
Noughts & Crosses ➔ A game is over when all
fields are taken ➔ A game is over when all fields in a column are taken by a player ➔ A game is over when all fields in a row are taken by a player ➔ A game is over when all fields in a diagonal are taken by a player ➔ A player can take a field if not already taken AKA Tic Tac Toe -
Begin! ➔ A game is over when all fields are
taken ➔ A game is over when all fields in a column are taken by a player ➔ A game is over when all fields in a row are taken by a player ➔ A game is over when all fields in a diagonal are taken by a player ➔ A player can take a field if not already taken ➔ Players take turns taking fields until the game is over -
Begin! ➔ A game is over when all fields are
taken ➔ A game is over when all fields in a column are taken by a player ➔ A game is over when all fields in a row are taken by a player ➔ A game is over when all fields in a diagonal are taken by a player ➔ A player can take a field if not already taken ➔ Players take turns taking fields until the game is over -
Begin! ➔ A game is over when all fields are
taken ➔ A game is over when all fields in a column are taken by a player ➔ A game is over when all fields in a row are taken by a player ➔ A game is over when all fields in a diagonal are taken by a player ➔ A player can take a field if not already taken ➔ Players take turns taking fields until the game is over -
Thanks! Gojko - His blog, write up and developing the
idea http://gojko.net/2009/08/02/tdd-as-if-you-meant-it- revisited/ Keith Brathwaite - For the concept @willwebst -
Mini Retro How did you find the exercise? Was it
hard to write code in your tests? Did your code improve as a result?