Your SlideShare is downloading. ×
0
@gil_zilberfeld
Spaceship TDD Style
Gil Zilberfeld
@gil_zilberfeld
Who Am I
Agile helper
Software improver
Author of “Everyday Unit Testing”
www.gilzilberfeld.com
www.everyd...
@gil_zilberfeld
Test Driven Development
@gil_zilberfeldhttp://www.buildtheenterprise.org/
@gil_zilberfeld
Rules of Engagement
• We’re building parts of a spaceship
• Gotta have a test framework
• Break into pairs...
@gil_zilberfeld
The Fantastic Four
• Navigation
• Weapons and Shields
• Engine
• Environment
Not the whole ship!
@gil_zilberfeld
Round 1: Silence of the Names
• Write empty tests
• Write as many test cases as possible using names
• All...
@gil_zilberfeld
Review - Names
• How do you feel about the names? Did it change over time?
• Did both of you suggest names...
@gil_zilberfeld
Round 2: Test Runner
• 1st person selects, writes and fails a test
• 2nd person makes it pass
• No refacto...
@gil_zilberfeld
Review – Test First, Pass Second
• How many tests passed?
• Which tests did you start with?
• Who’s holdin...
@gil_zilberfeld
Round 3 - Transformers
• Refactor code and tests
• Save the old version
• No adding and removing tests
• A...
@gil_zilberfeld
Review - Refactoring
• What did you decide to refactor?
• Who led the process?
• Did everyone agree on the...
@gil_zilberfeld
Round 4 –Predator Vs Alien
• Break up the pairs
• 3 minute introduction
• The Predators write the tests
• ...
@gil_zilberfeld
Review – Facing the unknown
• Predators:
• What was the quality of tests compared to the ones you wrote be...
@gil_zilberfeld
The many faces of TDD
• TDD is not just Red-Green-Refactor
• Can be done in different ways
• It is a learn...
@gil_zilberfeld
What did you learn?
• New
• Surprising
• Disappointing
@gil_zilberfeld
Thank You!
• Questions?
• Contact me:
• @gil_zilberfeld
• http://www.gilzilberfeld.com
• http://www.everyd...
Upcoming SlideShare
Loading in...5
×

Spaceship TDD Style

1,015

Published on

Slides of the lab we ran at Reversim summit 2013, building a spaceship in TDD

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,015
On Slideshare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
6
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Spaceship TDD Style"

  1. 1. @gil_zilberfeld Spaceship TDD Style Gil Zilberfeld
  2. 2. @gil_zilberfeld Who Am I Agile helper Software improver Author of “Everyday Unit Testing” www.gilzilberfeld.com www.everydayunittesting.com @gil_zilberfeld
  3. 3. @gil_zilberfeld Test Driven Development
  4. 4. @gil_zilberfeldhttp://www.buildtheenterprise.org/
  5. 5. @gil_zilberfeld Rules of Engagement • We’re building parts of a spaceship • Gotta have a test framework • Break into pairs • Introduce yourself - 5 minutes • Try to stick to technology you feel comfortable in • Work in rounds • 15 minute work • 10 public review
  6. 6. @gil_zilberfeld The Fantastic Four • Navigation • Weapons and Shields • Engine • Environment Not the whole ship!
  7. 7. @gil_zilberfeld Round 1: Silence of the Names • Write empty tests • Write as many test cases as possible using names • All tests should pass • No speaking
  8. 8. @gil_zilberfeld Review - Names • How do you feel about the names? Did it change over time? • Did both of you suggest names? • Are the names clear? • Did the tests pass? • How did the name ideation go? • How did the first test set the stage?
  9. 9. @gil_zilberfeld Round 2: Test Runner • 1st person selects, writes and fails a test • 2nd person makes it pass • No refactoring • All tests must pass
  10. 10. @gil_zilberfeld Review – Test First, Pass Second • How many tests passed? • Which tests did you start with? • Who’s holding up the line? What did you feel about this? • What is the quality of the code? • What is the quality of the test? • Do the names describe the tests correctly? • How much conversation time?
  11. 11. @gil_zilberfeld Round 3 - Transformers • Refactor code and tests • Save the old version • No adding and removing tests • All tests must pass
  12. 12. @gil_zilberfeld Review - Refactoring • What did you decide to refactor? • Who led the process? • Did everyone agree on the changes? • What did you refactor more, code or tests? • Did you run the tests after every change? • Did you do enough refactoring? • How long between test runs?
  13. 13. @gil_zilberfeld Round 4 –Predator Vs Alien • Break up the pairs • 3 minute introduction • The Predators write the tests • No talking to the aliens • Add more tests if needed • Step away when a test fails • The Aliens write the passing code • No talking to predators • Observe already working tests and code • Step away when a test passes • All tests must pass • Get points for passing additional tests
  14. 14. @gil_zilberfeld Review – Facing the unknown • Predators: • What was the quality of tests compared to the ones you wrote before? • Why did you pick those test cases? • How did you work together? • Aliens: • What did you think about the tests picked by the predators? • Was the existing code helpful? • How did you work together?
  15. 15. @gil_zilberfeld The many faces of TDD • TDD is not just Red-Green-Refactor • Can be done in different ways • It is a learning experience • More fun in groups / pairs
  16. 16. @gil_zilberfeld What did you learn? • New • Surprising • Disappointing
  17. 17. @gil_zilberfeld Thank You! • Questions? • Contact me: • @gil_zilberfeld • http://www.gilzilberfeld.com • http://www.everydayunittesting.com
  1. A particular slide catching your eye?

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

×