Guildford Coding Dojo1


Published on

Background slides for first Guildford coding dojo

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Guildford Coding Dojo1

  1. 1. k e ! gs to a s inBGuildford Coding Dojo
  2. 2. First Things FirstWho are you?What do you do?Coding experienceOne unusualfactoid aboutyourself
  3. 3. Some DefinitionsDojo - “the place oflearning the way”
  4. 4. Some DefinitionsKata - “way of doing”A choreographed series ofmotions designed to teacha particular skill orpattern
  5. 5. What’s the Idea?DeliberatePractice of KeySkillsLearn from othersHAVE FUN!
  6. 6. Dojo RulesWe respect eachother’s commitment(No phones, email,Facebook etc)We all do TDDWe all do pairprogrammingWe do “SimpleDesign”
  7. 7. Simple DesignAll tests passClear, expressive andconsistentDoes not duplicatebehaviour orconfigurationMinimises the numberof classes and methods
  8. 8. FormatPair upA problem is presented to be solvedWe work on it in pomodoros (25 minutecycles) - time up, 5 minute break to demoyour code to nearby pair, and reflectAt the end we show & tell our code
  9. 9. TDD RefreshWrite a failing testWatch it fail(!)Write code to make it passRefactorRinse & repeat
  10. 10. Uncle Bob’s Laws of TDD You may not write production code until you have written a failing unit test You may not write more of a unit test than is sufficient to fail (not compiling is a counted as a test failure) You may not write more production code than is sufficient to pass the currently failing test
  11. 11. FizzBuzzWrite a program thatprints the numbers from 1to 100. But for multiplesof three print “Fizz”instead of the number andfor the multiples of fiveprint “Buzz”. For numberswhich are multiples ofboth three and five print“FizzBuzz”:1, 2, Fizz, 4, Buzz,Fizz, 7, 8, Fizz, Buzz,11, Fizz, 13, 14,FizzBuzz, 16, 17, etc...
  12. 12.
  13. 13.
  14. 14. FizzBuzz (2)Now modify your code toprint “Whizz” formultiples of 7!Multiple of 3: FizzMultiple of 5: BuzzMultiple of 7: Whizz
  15. 15.
  16. 16.
  17. 17. FizzBuzz (3)Now modify your code toprint “Fizz” formultiples of 3 ANDnumbers with digit 3 inthem!Multiple of 3 or containsdigit ‘3’: FizzMultiple of 5: BuzzMultiple of 7: Whizz
  18. 18.
  19. 19.
  20. 20. So how did it go?Is the code clean?Any smells?Refactored? Howoften?Open/Closed?
  21. 21. Thank You Chris Pitts @thirstybear This work is licensed under a Creative CommonsAttribution-NonCommercial-NoDerivs 3.0 Unported License.
  22. 22. No, really...we’re done!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.