Upload
guy-royse
View
273
Download
1
Tags:
Embed Size (px)
DESCRIPTION
Are you tired of TDD workshops that make you do boring things like calculate bowling scores and prime factors or demonstrate how to win at the game of life? If so, this is the session for you! In this TDD workshop we will be building the domain model for EverCraft -- a new MMORPG from Blizzards of the Coast. We have lots of story cards prepared covering features from combat to magic, classes to spells, and races to items. Plus, we'll be defining some of these cards during the session in case you want that +9 knife of ogre slaying or enjoy casting magic missile at the darkness. This workshop is language agnotisic and for all levels of developers. The focus is on TDD and emergent design but pair programming will be covered as well. The only requirement is that you bring a laptop and that you be able to test-drive you code with your language of choice. When you are done you will emerge a better programmer for the experience but there is small chance you will have a craving for Cheetos and Mountain Dew.
Citation preview
Putting the D&D in TDD
IntroductionsGeorge Walters Guy Royse
Adjusting the Levels
• Interrupt Us• All Levels Session
– covering some basics• Not Selling TDD
– showing how not why– the experience will show the why
• We Expect You to Pair• Language Agnostic
– Ruby, Java, .NET, JavaScript, CoffeeScript, Clojure, Scala, Groovy, Dart… maybe not
• You Know Your Tools– we’re not here to teach you JUnit or RSpec
Katas
TheEvercraft
Kata
Adjusting the Levels
• Introduction• TDD & Ping Pong Pairing• Four Iterations
– retrospective after each iteration– brainstorming before iterations 2-4
• Iteration 1: Core Rules• Iteration 2: Classes• Lunch• Iteration 3: Races• Iteration 4: Items• Bonus Iteration: Battle Grid
Our Character Sheets
5th Level Facilitator• + 5 to Teaching: can help
and teach almost any student
• Bonus Feats: TDD and Pair Programming
• Kata Mastery: have mastered the Evercraft Kata and can help if pairs get log-jammed
1st Level Product Owner• Ideation: can form general
ideas for a product at will but won't know exactly what they want
• Clarity: given a question on requirements can unerringly answer it
• Agile Advocate: can promote Pairing, TDD, and other Agile ideas to business 3 times per day
Questions?
TDD & Ping Pong Pairing
A Brief History of Testing
TDD Cycle
Write a Failing Test
Code Just Enough to
Make It Pass
Refactor Your Crappy Code
Ping Pong Pairing
Write a Failing Test
Code Just Enough to
Make It Pass
Refactor Your Crappy Code
Dos & Don’ts
Do…• …start with a failing test.• …write tests that become more and more specific.• …write code that becomes more and more generic.• …take turns writing tests, coding, and refactoring.• …kibitz while pairing.• …consider keeping a list of tests you need to write.
Don’t…• …write more than one test at a time.• …have more than one assert in a test.• …write any more code than is needed to make the current
test pass.• …code alone.
Questions?
Evercraft
Pair Up
During the Kata
• Ask Questions– as product owners we might not know what we want– as facilitators we might have gaps in our material
• Present Ideas– as product owners we might like them more
• Code the Model Only• No Dice (it's just not worth the hassle)
Rolling Up a Character
• Roll Your Own• Clone from GitHub
– https://github.com/walterg2/EverCraft-Kata– Available Projects
• Java & JUnit• C# & NUnit• Ruby & RSpec• CoffeeScript or JavaScript & Jasmine• Python• Clojure• Scala
Iteration 1Core Rules
Iteration 2Classes
Welcome BackReorientation
Iteration 3Races
Iteration 4Items
Retrospective
AndThe
WinnerIs…
Contact InformationGeorge Walters Guy Royse
Image Credits
http://www.flickr.com/photos/kimonomania/602858091http://www.flickr.com/photos/warquel/3300858929http://www.flickr.com/photos/pandiyan/82387772
http://www.flickr.com/photos/camerajohn/5151120039http://www.flickr.com/photos/kaptainkobold/174388593
http://www.flickr.com/photos/cuppini/2378443920http://www.flickr.com/photos/melloveschallah/3304593555
http://www.flickr.com/photos/denemiles/3971887734http://www.flickr.com/photos/howardlake/4318605890