Guildford Coding Dojo1

229 views
158 views

Published on

Background slides for first Guildford coding dojo http://www.meetup.com/Guildford-Coding-Dojo/

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
229
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
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) - http://tomato.ist/gcdWhen 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. http://tomato.ist/gcd
  13. 13. http://tomato.ist/gcd
  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. http://tomato.ist/gcd
  16. 16. http://tomato.ist/gcd
  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. http://tomato.ist/gcd
  19. 19. http://tomato.ist/gcd
  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!

×