Guildford Coding Dojo1
-
Upload
thirstybear -
Category
Technology
-
view
102 -
download
0
description
Transcript of Guildford Coding Dojo1
Guildford Coding DojoGuildford Coding Dojo
⁁
Basing
stoke!
Basing
stoke!
First Things FirstFirst Things First
Who are you?
What do you do?
Coding experience
One unusual factoid about yourself
Who are you?
What do you do?
Coding experience
One unusual factoid about yourself
Some DefinitionsSome Definitions
Dojo - “the place of learning the way”Dojo - “the place of learning the way”
Some DefinitionsSome Definitions
Kata - “way of doing”
A choreographed series of motions designed to teach a particular skill or pattern
Kata - “way of doing”
A choreographed series of motions designed to teach a particular skill or pattern
What’s the Idea?What’s the Idea?
Deliberate Practice of Key Skills
Learn from others
HAVE FUN!
Deliberate Practice of Key Skills
Learn from others
HAVE FUN!
Dojo RulesDojo Rules
We respect each other’s commitment (No phones, email, Facebook etc)
We all do TDD
We all do pair programming
We do “Simple Design”
We respect each other’s commitment (No phones, email, Facebook etc)
We all do TDD
We all do pair programming
We do “Simple Design”
Simple DesignSimple Design
All tests pass
Clear, expressive and consistent
Does not duplicate behaviour or configuration
Minimises the number of classes and methods
All tests pass
Clear, expressive and consistent
Does not duplicate behaviour or configuration
Minimises the number of classes and methods
FormatFormat
Pair up
A problem is presented to be solved
We work on it in pomodoros (25 minute cycles) - http://tomato.ist/gcd
When time up, 5 minute break to demo your code to nearby pair, and reflect
At the end we show & tell our code
Pair up
A problem is presented to be solved
We work on it in pomodoros (25 minute cycles) - http://tomato.ist/gcd
When time up, 5 minute break to demo your code to nearby pair, and reflect
At the end we show & tell our code
TDD RefreshTDD Refresh
Write a failing test
Watch it fail(!)
Write code to make it pass
Refactor
Rinse & repeat
Write a failing test
Watch it fail(!)
Write code to make it pass
Refactor
Rinse & repeat
Uncle Bob’s Laws of TDDUncle 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
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
FizzBuzzFizzBuzzWrite a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”:
1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14, FizzBuzz, 16, 17, etc...
Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”:
1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14, FizzBuzz, 16, 17, etc...
FizzBuzz (2)FizzBuzz (2)Now modify your code to print “Whizz” for multiples of 7!
Multiple of 3: Fizz
Multiple of 5: Buzz
Multiple of 7: Whizz
Now modify your code to print “Whizz” for multiples of 7!
Multiple of 3: Fizz
Multiple of 5: Buzz
Multiple of 7: Whizz
FizzBuzz (3)FizzBuzz (3)Now modify your code to print “Fizz” for multiples of 3 AND numbers with digit 3 in them!
Multiple of 3 or contains digit ‘3’: Fizz
Multiple of 5: Buzz
Multiple of 7: Whizz
Now modify your code to print “Fizz” for multiples of 3 AND numbers with digit 3 in them!
Multiple of 3 or contains digit ‘3’: Fizz
Multiple of 5: Buzz
Multiple of 7: Whizz
So how did it go?So how did it go?
Is the code clean?
Any smells?
Refactored? How often?
Open/Closed?
Is the code clean?
Any smells?
Refactored? How often?
Open/Closed?
Thank YouThank You
Chris PittsChris Pitts@thirstybear@thirstybear
This work is licensed under a Creative Commons Attribution-This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.NonCommercial-NoDerivs 3.0 Unported License.
No, really...we’re done!No, really...we’re done!