SlideShare a Scribd company logo
Bryan Beecham and Mike Bowler
TDD with LEGO

Thank you to our Sponsors

Monday, 11 November, 13
Understanding
TDD with LEGO
Bryan Beecham
@BillyGarnet
Mike Bowler
@mike_bowler

Monday, 11 November, 13
Exercise - 1

Open up one LEGO packet
Build a person and a house out of LEGO

Monday, 11 November, 13
Admire your work

Take a photo. Upload to Twitter. Brag to your friends.

Monday, 11 November, 13
Reference
Test-Driven
Development
By Example
Kent Beck

Monday, 11 November, 13
What is the goal of TDD?

It creates clean code that works ~ Ron Jefferies

Monday, 11 November, 13
TDD

It is a predictable way to develop. You know when you
are finished, without having to worry about a long bug
trail.

Monday, 11 November, 13
TDD

It gives you a chance to learn all of the lessons that the
code has to teach you. If you only slap together the first
thing you think of, then you never have time to think of a
second, better thing.

Monday, 11 November, 13
TDD

It improves the lives of the users of your software.

Monday, 11 November, 13
TDD

It lets your teammates count on you, and you on them.

Monday, 11 November, 13
TDD

It feels good to write it.

Monday, 11 November, 13
The Mantra

Red - Green - Refactor
photo from doolwind.com

Monday, 11 November, 13
The Mantra - Red

Write a small test that doesn’t work

Monday, 11 November, 13
The Mantra - Green

Do the minimum to make the test work

Monday, 11 November, 13
The Mantra - Refactor

Eliminate duplication

Monday, 11 November, 13
Exercise - 2

Build a person and a house with TDD

Monday, 11 November, 13
Prepare your environment

Clear the area in front of you. This is your program.
The perfect program!

Monday, 11 November, 13
First Test

Does the person exist? No?

Monday, 11 November, 13
Hurray!!!
We failed the test!
Celebrate! High 5s!

Monday, 11 November, 13
Minimum to pass the test

Add a block. Can that be a person?

Monday, 11 November, 13
Hurray!!!

The person now exists!
Not very impressive but it could represent a person.
We passed the test! We are rocking now!

Monday, 11 November, 13
Refactor

Remove any duplication. In this case we’re good.

Monday, 11 November, 13
Same thing for house

Blah, blah, awesome recreation by speaker...everyone is
extremely impressed and are thinking this might be the
best session of the whole conference.

Monday, 11 November, 13
We need a new test

The house is taller then the person.
Assert.IsTrue(house.height > person.height);

Monday, 11 November, 13
Hurray!!! More Failure
The person is the
same size so we fail
this test.
Well done!

Monday, 11 November, 13
Failure =
Learning Opportunity

If you’re not failing, you’re not learning.
If you’re not learning...

Monday, 11 November, 13
Minimum to pass the test

From the audience this time. Anyone? Bueller?

Monday, 11 November, 13
Hurray!!! - Success

Alright, we passed the test.

Monday, 11 November, 13
Refactor

Still very simple. Still nice and clean.

Monday, 11 November, 13
Software Requirements
Software must do three things:
It must work
It must be understandable
It must be updatable

Monday, 11 November, 13
We need a new test
Is the house wider then the person? No?
We failed another test! Awesome! We are learning a lot
about improvements that are needed to our code.
Let’s do the minimum to pass the test.
Any duplication to remove?

Monday, 11 November, 13
We need a new test
Can your person fit in the house? Yikes! No.
We failed another test! Awesome! We are learning so
much about what our customer needs.
Let’s do the minimum to pass the test.
Any duplication to remove?

Monday, 11 November, 13
Exercise - 3 Partners!
Break into groups of
two for this next
exercise.
When developers do
this we call it Pair
Programming
Berkley photo from the web

Monday, 11 November, 13
New Requirements
Your new program needs to have:
A person
A house
A tree
An animal
A vehicle

Monday, 11 November, 13
Let’s Practice!
Work together and write down a new test
Build minimally pass the test
Repeat (Don’t worry about Refactoring for now)
Here’s a few if you get stuck:
Is the house at least x bricks tall?
Is the tree the same size as the house?
Is the animal smaller than the person?

Monday, 11 November, 13
New Requirements
Your new program needs to have:
A person
A house
A tree
An animal
A vehicle

Monday, 11 November, 13
Review

Let’s take a minute to walk around and look at
everybody’s creations!
Taking breaks and stretching your muscles (eyes, legs,
arms, back) is very important to stay healthy.

Monday, 11 November, 13
Apology
You may have to break your wonderful new structures for
the components for the next section.
Don’t worry, there is more building to come!
Please do take a photo. Remember @BillyGarnet and
@mike_bowler #SDEC13 if you’re tweeting about the
amazing time you’re having!

Monday, 11 November, 13
Refactoring

Refactoring is the process of changing a software system
in such a way that it does not alter the external behaviour
of the code yet improves its internal structure.
~Martin Fowler

Monday, 11 November, 13
Super Fast Break
Stand up and stretch - really, it’s important!
Share something you’ve learned with a neighbour!

Monday, 11 November, 13
Exercise 4 -Team Build
Each table will come up with a large structure with lots of
parts to build. (airport, zoo, amusement park...)
You will be a software team, working in pairs, contributing
to the large team structure (the build) at your table.

Monday, 11 November, 13
Decide on an idea

Shh...don’t tell the other tables.
(Jeopardy music...)

Monday, 11 November, 13
Break it into components
Take a minute to write out a few of the components that
need to be built (product backlog).
Each pair will build a component through TDD.
We will then add the sections to the big project.
Make sure you don’t break your teams tests!
Write your test on paper, fail, then add lego to pass.

Monday, 11 November, 13
Demo time!

A few teams will now present their creation.
Please share the tests that you came up with and point
out the solution.

Monday, 11 November, 13
Review
Test-Driven Development / Design
Refactoring
Pair Programming
A bit of developer speak
Experience working on a software team

Monday, 11 November, 13
Questions?
Bryan Beecham
@BillyGarnet
bbeecham@fusebill.com
Mike Bowler
@mike_bowler
mbowler@gargoylesoftware.com
Please separate the lego bricks into their respective
colours

Monday, 11 November, 13
No really, it’s over

Monday, 11 November, 13
There are no more slides

Monday, 11 November, 13
No trailers

Monday, 11 November, 13
Looking for more?

Check out http://www.humanrefactor.com
Links to HumanRefactoring, and soon more LEGO!

Monday, 11 November, 13

More Related Content

Similar to TDD with LEGO at SDEC13

When Tdd Goes Awry
When Tdd Goes AwryWhen Tdd Goes Awry
When Tdd Goes Awry
Uberto Barbini
 
Reinventing Yourself
Reinventing YourselfReinventing Yourself
Reinventing Yourself
Michael Denomy
 
Survive in iPhone App Store@GDC China 2010
Survive in iPhone App Store@GDC China 2010Survive in iPhone App Store@GDC China 2010
Survive in iPhone App Store@GDC China 2010
Coconut Island
 
SpeakUp – A Mobile App Facilitating Audience Interaction
SpeakUp – A Mobile App Facilitating Audience InteractionSpeakUp – A Mobile App Facilitating Audience Interaction
SpeakUp – A Mobile App Facilitating Audience Interaction
Sten Govaerts
 
Android Design: Beyond the Guidelines
Android Design: Beyond the GuidelinesAndroid Design: Beyond the Guidelines
Android Design: Beyond the Guidelines
kevingrant5
 
5 Ways to Awesome-ize Your (PHP) Code
5 Ways to Awesome-ize Your (PHP) Code5 Ways to Awesome-ize Your (PHP) Code
5 Ways to Awesome-ize Your (PHP) Code
Jeremy Kendall
 
Slaying Bugs with Gradle and Jenkins
Slaying Bugs with Gradle and JenkinsSlaying Bugs with Gradle and Jenkins
Slaying Bugs with Gradle and Jenkins
David Kay
 
Boston University - Digital Media
Boston University - Digital MediaBoston University - Digital Media
Boston University - Digital Media
PRSSANational
 
KANBAN – NOT „YET ANOTHER DEVELOPMENT PROCESS“ (FLORIAN EISENBERG) - LKCE13
KANBAN – NOT „YET ANOTHER DEVELOPMENT PROCESS“ (FLORIAN EISENBERG) - LKCE13KANBAN – NOT „YET ANOTHER DEVELOPMENT PROCESS“ (FLORIAN EISENBERG) - LKCE13
KANBAN – NOT „YET ANOTHER DEVELOPMENT PROCESS“ (FLORIAN EISENBERG) - LKCE13
Lean Kanban Central Europe
 
Hack Into the Hybrid: The Whys, Hows, and Wows of Making your Course a Blende...
Hack Into the Hybrid: The Whys, Hows, and Wows of Making your Course a Blende...Hack Into the Hybrid: The Whys, Hows, and Wows of Making your Course a Blende...
Hack Into the Hybrid: The Whys, Hows, and Wows of Making your Course a Blende...
Amy Burvall
 
Beyond landing pages
Beyond landing pagesBeyond landing pages
Beyond landing pages
Robert-Emmanuel Mayssat
 
Unit5 schedule engl208_fall2020
Unit5 schedule engl208_fall2020Unit5 schedule engl208_fall2020
Unit5 schedule engl208_fall2020
Jan Johnson
 
Unit5 schedule engl208_fall
Unit5 schedule engl208_fallUnit5 schedule engl208_fall
Unit5 schedule engl208_fall
GeorgiaCloepfil
 
Unit5 schedule engl208_fall
Unit5 schedule engl208_fallUnit5 schedule engl208_fall
Unit5 schedule engl208_fall
GeorgiaCloepfil
 
Python Ecosystem for Beginners - PyCon Uruguay 2013
Python Ecosystem for Beginners - PyCon Uruguay 2013Python Ecosystem for Beginners - PyCon Uruguay 2013
Python Ecosystem for Beginners - PyCon Uruguay 2013
Hannes Hapke
 
Unit5 schedule engl208_fall
Unit5 schedule engl208_fallUnit5 schedule engl208_fall
Unit5 schedule engl208_fall
Jan Johnson
 
Debugging SEO - Language & Breaking Down
Debugging SEO - Language & Breaking DownDebugging SEO - Language & Breaking Down
Debugging SEO - Language & Breaking Down
Dominic Woodman
 
99 inception-deck
99 inception-deck99 inception-deck
99 inception-deckdrewz lin
 
Some simple tips for front-end performance in WordPress
Some simple tips for front-end performance in WordPressSome simple tips for front-end performance in WordPress
Some simple tips for front-end performance in WordPress
iparr
 

Similar to TDD with LEGO at SDEC13 (20)

When Tdd Goes Awry
When Tdd Goes AwryWhen Tdd Goes Awry
When Tdd Goes Awry
 
Reinventing Yourself
Reinventing YourselfReinventing Yourself
Reinventing Yourself
 
Survive in iPhone App Store@GDC China 2010
Survive in iPhone App Store@GDC China 2010Survive in iPhone App Store@GDC China 2010
Survive in iPhone App Store@GDC China 2010
 
SpeakUp – A Mobile App Facilitating Audience Interaction
SpeakUp – A Mobile App Facilitating Audience InteractionSpeakUp – A Mobile App Facilitating Audience Interaction
SpeakUp – A Mobile App Facilitating Audience Interaction
 
Android Design: Beyond the Guidelines
Android Design: Beyond the GuidelinesAndroid Design: Beyond the Guidelines
Android Design: Beyond the Guidelines
 
5 Ways to Awesome-ize Your (PHP) Code
5 Ways to Awesome-ize Your (PHP) Code5 Ways to Awesome-ize Your (PHP) Code
5 Ways to Awesome-ize Your (PHP) Code
 
Slaying Bugs with Gradle and Jenkins
Slaying Bugs with Gradle and JenkinsSlaying Bugs with Gradle and Jenkins
Slaying Bugs with Gradle and Jenkins
 
Boston University - Digital Media
Boston University - Digital MediaBoston University - Digital Media
Boston University - Digital Media
 
KANBAN – NOT „YET ANOTHER DEVELOPMENT PROCESS“ (FLORIAN EISENBERG) - LKCE13
KANBAN – NOT „YET ANOTHER DEVELOPMENT PROCESS“ (FLORIAN EISENBERG) - LKCE13KANBAN – NOT „YET ANOTHER DEVELOPMENT PROCESS“ (FLORIAN EISENBERG) - LKCE13
KANBAN – NOT „YET ANOTHER DEVELOPMENT PROCESS“ (FLORIAN EISENBERG) - LKCE13
 
Hack Into the Hybrid: The Whys, Hows, and Wows of Making your Course a Blende...
Hack Into the Hybrid: The Whys, Hows, and Wows of Making your Course a Blende...Hack Into the Hybrid: The Whys, Hows, and Wows of Making your Course a Blende...
Hack Into the Hybrid: The Whys, Hows, and Wows of Making your Course a Blende...
 
Beyond landing pages
Beyond landing pagesBeyond landing pages
Beyond landing pages
 
SPRINT3R-SWPSDLC2556-CLOSING
SPRINT3R-SWPSDLC2556-CLOSINGSPRINT3R-SWPSDLC2556-CLOSING
SPRINT3R-SWPSDLC2556-CLOSING
 
Unit5 schedule engl208_fall2020
Unit5 schedule engl208_fall2020Unit5 schedule engl208_fall2020
Unit5 schedule engl208_fall2020
 
Unit5 schedule engl208_fall
Unit5 schedule engl208_fallUnit5 schedule engl208_fall
Unit5 schedule engl208_fall
 
Unit5 schedule engl208_fall
Unit5 schedule engl208_fallUnit5 schedule engl208_fall
Unit5 schedule engl208_fall
 
Python Ecosystem for Beginners - PyCon Uruguay 2013
Python Ecosystem for Beginners - PyCon Uruguay 2013Python Ecosystem for Beginners - PyCon Uruguay 2013
Python Ecosystem for Beginners - PyCon Uruguay 2013
 
Unit5 schedule engl208_fall
Unit5 schedule engl208_fallUnit5 schedule engl208_fall
Unit5 schedule engl208_fall
 
Debugging SEO - Language & Breaking Down
Debugging SEO - Language & Breaking DownDebugging SEO - Language & Breaking Down
Debugging SEO - Language & Breaking Down
 
99 inception-deck
99 inception-deck99 inception-deck
99 inception-deck
 
Some simple tips for front-end performance in WordPress
Some simple tips for front-end performance in WordPressSome simple tips for front-end performance in WordPress
Some simple tips for front-end performance in WordPress
 

Recently uploaded

DIGIDEVTV A New area of OTT Distribution
DIGIDEVTV  A New area of OTT DistributionDIGIDEVTV  A New area of OTT Distribution
DIGIDEVTV A New area of OTT Distribution
joeqsm
 
Emcee Profile_ Subbu from Bangalore .pdf
Emcee Profile_ Subbu from Bangalore .pdfEmcee Profile_ Subbu from Bangalore .pdf
Emcee Profile_ Subbu from Bangalore .pdf
subran
 
Treasure Hunt Puzzles, Treasure Hunt Puzzles online
Treasure Hunt Puzzles, Treasure Hunt Puzzles onlineTreasure Hunt Puzzles, Treasure Hunt Puzzles online
Treasure Hunt Puzzles, Treasure Hunt Puzzles online
Hidden Treasure Hunts
 
I Know Dino Trivia: Part 3. Test your dino knowledge
I Know Dino Trivia: Part 3. Test your dino knowledgeI Know Dino Trivia: Part 3. Test your dino knowledge
I Know Dino Trivia: Part 3. Test your dino knowledge
Sabrina Ricci
 
Christina's Baby Shower Game June 2024.pptx
Christina's Baby Shower Game June 2024.pptxChristina's Baby Shower Game June 2024.pptx
Christina's Baby Shower Game June 2024.pptx
madeline604788
 
哪里买(osu毕业证书)美国俄勒冈州立大学毕业证双学位证书原版一模一样
哪里买(osu毕业证书)美国俄勒冈州立大学毕业证双学位证书原版一模一样哪里买(osu毕业证书)美国俄勒冈州立大学毕业证双学位证书原版一模一样
哪里买(osu毕业证书)美国俄勒冈州立大学毕业证双学位证书原版一模一样
9u08k0x
 
This Is The First All Category Quiz That I Made
This Is The First All Category Quiz That I MadeThis Is The First All Category Quiz That I Made
This Is The First All Category Quiz That I Made
Aarush Ghate
 
Hollywood Actress - The 250 hottest gallery
Hollywood Actress - The 250 hottest galleryHollywood Actress - The 250 hottest gallery
Hollywood Actress - The 250 hottest gallery
Zsolt Nemeth
 
高仿(nyu毕业证书)美国纽约大学毕业证文凭毕业证原版一模一样
高仿(nyu毕业证书)美国纽约大学毕业证文凭毕业证原版一模一样高仿(nyu毕业证书)美国纽约大学毕业证文凭毕业证原版一模一样
高仿(nyu毕业证书)美国纽约大学毕业证文凭毕业证原版一模一样
9u08k0x
 
Snoopy boards the big bow wow musical __
Snoopy boards the big bow wow musical __Snoopy boards the big bow wow musical __
Snoopy boards the big bow wow musical __
catcabrera
 
240529_Teleprotection Global Market Report 2024.pdf
240529_Teleprotection Global Market Report 2024.pdf240529_Teleprotection Global Market Report 2024.pdf
240529_Teleprotection Global Market Report 2024.pdf
Madhura TBRC
 
Skeem Saam in June 2024 available on Forum
Skeem Saam in June 2024 available on ForumSkeem Saam in June 2024 available on Forum
Skeem Saam in June 2024 available on Forum
Isaac More
 
A TO Z INDIA Monthly Magazine - JUNE 2024
A TO Z INDIA Monthly Magazine - JUNE 2024A TO Z INDIA Monthly Magazine - JUNE 2024
A TO Z INDIA Monthly Magazine - JUNE 2024
Indira Srivatsa
 
_7 OTT App Builders to Support the Development of Your Video Applications_.pdf
_7 OTT App Builders to Support the Development of Your Video Applications_.pdf_7 OTT App Builders to Support the Development of Your Video Applications_.pdf
_7 OTT App Builders to Support the Development of Your Video Applications_.pdf
Mega P
 
Modern Radio Frequency Access Control Systems: The Key to Efficiency and Safety
Modern Radio Frequency Access Control Systems: The Key to Efficiency and SafetyModern Radio Frequency Access Control Systems: The Key to Efficiency and Safety
Modern Radio Frequency Access Control Systems: The Key to Efficiency and Safety
AITIX LLC
 
The Ultimate Guide to Setting Up Eternal IPTV on Your Devices.docx
The Ultimate Guide to Setting Up Eternal IPTV on Your Devices.docxThe Ultimate Guide to Setting Up Eternal IPTV on Your Devices.docx
The Ultimate Guide to Setting Up Eternal IPTV on Your Devices.docx
Xtreame HDTV
 
Matt Rife Cancels Shows Due to Health Concerns, Reschedules Tour Dates.pdf
Matt Rife Cancels Shows Due to Health Concerns, Reschedules Tour Dates.pdfMatt Rife Cancels Shows Due to Health Concerns, Reschedules Tour Dates.pdf
Matt Rife Cancels Shows Due to Health Concerns, Reschedules Tour Dates.pdf
Azura Everhart
 
Tom Selleck Net Worth: A Comprehensive Analysis
Tom Selleck Net Worth: A Comprehensive AnalysisTom Selleck Net Worth: A Comprehensive Analysis
Tom Selleck Net Worth: A Comprehensive Analysis
greendigital
 
Young Tom Selleck: A Journey Through His Early Years and Rise to Stardom
Young Tom Selleck: A Journey Through His Early Years and Rise to StardomYoung Tom Selleck: A Journey Through His Early Years and Rise to Stardom
Young Tom Selleck: A Journey Through His Early Years and Rise to Stardom
greendigital
 
Meet Dinah Mattingly – Larry Bird’s Partner in Life and Love
Meet Dinah Mattingly – Larry Bird’s Partner in Life and LoveMeet Dinah Mattingly – Larry Bird’s Partner in Life and Love
Meet Dinah Mattingly – Larry Bird’s Partner in Life and Love
get joys
 

Recently uploaded (20)

DIGIDEVTV A New area of OTT Distribution
DIGIDEVTV  A New area of OTT DistributionDIGIDEVTV  A New area of OTT Distribution
DIGIDEVTV A New area of OTT Distribution
 
Emcee Profile_ Subbu from Bangalore .pdf
Emcee Profile_ Subbu from Bangalore .pdfEmcee Profile_ Subbu from Bangalore .pdf
Emcee Profile_ Subbu from Bangalore .pdf
 
Treasure Hunt Puzzles, Treasure Hunt Puzzles online
Treasure Hunt Puzzles, Treasure Hunt Puzzles onlineTreasure Hunt Puzzles, Treasure Hunt Puzzles online
Treasure Hunt Puzzles, Treasure Hunt Puzzles online
 
I Know Dino Trivia: Part 3. Test your dino knowledge
I Know Dino Trivia: Part 3. Test your dino knowledgeI Know Dino Trivia: Part 3. Test your dino knowledge
I Know Dino Trivia: Part 3. Test your dino knowledge
 
Christina's Baby Shower Game June 2024.pptx
Christina's Baby Shower Game June 2024.pptxChristina's Baby Shower Game June 2024.pptx
Christina's Baby Shower Game June 2024.pptx
 
哪里买(osu毕业证书)美国俄勒冈州立大学毕业证双学位证书原版一模一样
哪里买(osu毕业证书)美国俄勒冈州立大学毕业证双学位证书原版一模一样哪里买(osu毕业证书)美国俄勒冈州立大学毕业证双学位证书原版一模一样
哪里买(osu毕业证书)美国俄勒冈州立大学毕业证双学位证书原版一模一样
 
This Is The First All Category Quiz That I Made
This Is The First All Category Quiz That I MadeThis Is The First All Category Quiz That I Made
This Is The First All Category Quiz That I Made
 
Hollywood Actress - The 250 hottest gallery
Hollywood Actress - The 250 hottest galleryHollywood Actress - The 250 hottest gallery
Hollywood Actress - The 250 hottest gallery
 
高仿(nyu毕业证书)美国纽约大学毕业证文凭毕业证原版一模一样
高仿(nyu毕业证书)美国纽约大学毕业证文凭毕业证原版一模一样高仿(nyu毕业证书)美国纽约大学毕业证文凭毕业证原版一模一样
高仿(nyu毕业证书)美国纽约大学毕业证文凭毕业证原版一模一样
 
Snoopy boards the big bow wow musical __
Snoopy boards the big bow wow musical __Snoopy boards the big bow wow musical __
Snoopy boards the big bow wow musical __
 
240529_Teleprotection Global Market Report 2024.pdf
240529_Teleprotection Global Market Report 2024.pdf240529_Teleprotection Global Market Report 2024.pdf
240529_Teleprotection Global Market Report 2024.pdf
 
Skeem Saam in June 2024 available on Forum
Skeem Saam in June 2024 available on ForumSkeem Saam in June 2024 available on Forum
Skeem Saam in June 2024 available on Forum
 
A TO Z INDIA Monthly Magazine - JUNE 2024
A TO Z INDIA Monthly Magazine - JUNE 2024A TO Z INDIA Monthly Magazine - JUNE 2024
A TO Z INDIA Monthly Magazine - JUNE 2024
 
_7 OTT App Builders to Support the Development of Your Video Applications_.pdf
_7 OTT App Builders to Support the Development of Your Video Applications_.pdf_7 OTT App Builders to Support the Development of Your Video Applications_.pdf
_7 OTT App Builders to Support the Development of Your Video Applications_.pdf
 
Modern Radio Frequency Access Control Systems: The Key to Efficiency and Safety
Modern Radio Frequency Access Control Systems: The Key to Efficiency and SafetyModern Radio Frequency Access Control Systems: The Key to Efficiency and Safety
Modern Radio Frequency Access Control Systems: The Key to Efficiency and Safety
 
The Ultimate Guide to Setting Up Eternal IPTV on Your Devices.docx
The Ultimate Guide to Setting Up Eternal IPTV on Your Devices.docxThe Ultimate Guide to Setting Up Eternal IPTV on Your Devices.docx
The Ultimate Guide to Setting Up Eternal IPTV on Your Devices.docx
 
Matt Rife Cancels Shows Due to Health Concerns, Reschedules Tour Dates.pdf
Matt Rife Cancels Shows Due to Health Concerns, Reschedules Tour Dates.pdfMatt Rife Cancels Shows Due to Health Concerns, Reschedules Tour Dates.pdf
Matt Rife Cancels Shows Due to Health Concerns, Reschedules Tour Dates.pdf
 
Tom Selleck Net Worth: A Comprehensive Analysis
Tom Selleck Net Worth: A Comprehensive AnalysisTom Selleck Net Worth: A Comprehensive Analysis
Tom Selleck Net Worth: A Comprehensive Analysis
 
Young Tom Selleck: A Journey Through His Early Years and Rise to Stardom
Young Tom Selleck: A Journey Through His Early Years and Rise to StardomYoung Tom Selleck: A Journey Through His Early Years and Rise to Stardom
Young Tom Selleck: A Journey Through His Early Years and Rise to Stardom
 
Meet Dinah Mattingly – Larry Bird’s Partner in Life and Love
Meet Dinah Mattingly – Larry Bird’s Partner in Life and LoveMeet Dinah Mattingly – Larry Bird’s Partner in Life and Love
Meet Dinah Mattingly – Larry Bird’s Partner in Life and Love
 

TDD with LEGO at SDEC13

  • 1. Bryan Beecham and Mike Bowler TDD with LEGO Thank you to our Sponsors Monday, 11 November, 13
  • 2. Understanding TDD with LEGO Bryan Beecham @BillyGarnet Mike Bowler @mike_bowler Monday, 11 November, 13
  • 3. Exercise - 1 Open up one LEGO packet Build a person and a house out of LEGO Monday, 11 November, 13
  • 4. Admire your work Take a photo. Upload to Twitter. Brag to your friends. Monday, 11 November, 13
  • 6. What is the goal of TDD? It creates clean code that works ~ Ron Jefferies Monday, 11 November, 13
  • 7. TDD It is a predictable way to develop. You know when you are finished, without having to worry about a long bug trail. Monday, 11 November, 13
  • 8. TDD It gives you a chance to learn all of the lessons that the code has to teach you. If you only slap together the first thing you think of, then you never have time to think of a second, better thing. Monday, 11 November, 13
  • 9. TDD It improves the lives of the users of your software. Monday, 11 November, 13
  • 10. TDD It lets your teammates count on you, and you on them. Monday, 11 November, 13
  • 11. TDD It feels good to write it. Monday, 11 November, 13
  • 12. The Mantra Red - Green - Refactor photo from doolwind.com Monday, 11 November, 13
  • 13. The Mantra - Red Write a small test that doesn’t work Monday, 11 November, 13
  • 14. The Mantra - Green Do the minimum to make the test work Monday, 11 November, 13
  • 15. The Mantra - Refactor Eliminate duplication Monday, 11 November, 13
  • 16. Exercise - 2 Build a person and a house with TDD Monday, 11 November, 13
  • 17. Prepare your environment Clear the area in front of you. This is your program. The perfect program! Monday, 11 November, 13
  • 18. First Test Does the person exist? No? Monday, 11 November, 13
  • 19. Hurray!!! We failed the test! Celebrate! High 5s! Monday, 11 November, 13
  • 20. Minimum to pass the test Add a block. Can that be a person? Monday, 11 November, 13
  • 21. Hurray!!! The person now exists! Not very impressive but it could represent a person. We passed the test! We are rocking now! Monday, 11 November, 13
  • 22. Refactor Remove any duplication. In this case we’re good. Monday, 11 November, 13
  • 23. Same thing for house Blah, blah, awesome recreation by speaker...everyone is extremely impressed and are thinking this might be the best session of the whole conference. Monday, 11 November, 13
  • 24. We need a new test The house is taller then the person. Assert.IsTrue(house.height > person.height); Monday, 11 November, 13
  • 25. Hurray!!! More Failure The person is the same size so we fail this test. Well done! Monday, 11 November, 13
  • 26. Failure = Learning Opportunity If you’re not failing, you’re not learning. If you’re not learning... Monday, 11 November, 13
  • 27. Minimum to pass the test From the audience this time. Anyone? Bueller? Monday, 11 November, 13
  • 28. Hurray!!! - Success Alright, we passed the test. Monday, 11 November, 13
  • 29. Refactor Still very simple. Still nice and clean. Monday, 11 November, 13
  • 30. Software Requirements Software must do three things: It must work It must be understandable It must be updatable Monday, 11 November, 13
  • 31. We need a new test Is the house wider then the person? No? We failed another test! Awesome! We are learning a lot about improvements that are needed to our code. Let’s do the minimum to pass the test. Any duplication to remove? Monday, 11 November, 13
  • 32. We need a new test Can your person fit in the house? Yikes! No. We failed another test! Awesome! We are learning so much about what our customer needs. Let’s do the minimum to pass the test. Any duplication to remove? Monday, 11 November, 13
  • 33. Exercise - 3 Partners! Break into groups of two for this next exercise. When developers do this we call it Pair Programming Berkley photo from the web Monday, 11 November, 13
  • 34. New Requirements Your new program needs to have: A person A house A tree An animal A vehicle Monday, 11 November, 13
  • 35. Let’s Practice! Work together and write down a new test Build minimally pass the test Repeat (Don’t worry about Refactoring for now) Here’s a few if you get stuck: Is the house at least x bricks tall? Is the tree the same size as the house? Is the animal smaller than the person? Monday, 11 November, 13
  • 36. New Requirements Your new program needs to have: A person A house A tree An animal A vehicle Monday, 11 November, 13
  • 37. Review Let’s take a minute to walk around and look at everybody’s creations! Taking breaks and stretching your muscles (eyes, legs, arms, back) is very important to stay healthy. Monday, 11 November, 13
  • 38. Apology You may have to break your wonderful new structures for the components for the next section. Don’t worry, there is more building to come! Please do take a photo. Remember @BillyGarnet and @mike_bowler #SDEC13 if you’re tweeting about the amazing time you’re having! Monday, 11 November, 13
  • 39. Refactoring Refactoring is the process of changing a software system in such a way that it does not alter the external behaviour of the code yet improves its internal structure. ~Martin Fowler Monday, 11 November, 13
  • 40. Super Fast Break Stand up and stretch - really, it’s important! Share something you’ve learned with a neighbour! Monday, 11 November, 13
  • 41. Exercise 4 -Team Build Each table will come up with a large structure with lots of parts to build. (airport, zoo, amusement park...) You will be a software team, working in pairs, contributing to the large team structure (the build) at your table. Monday, 11 November, 13
  • 42. Decide on an idea Shh...don’t tell the other tables. (Jeopardy music...) Monday, 11 November, 13
  • 43. Break it into components Take a minute to write out a few of the components that need to be built (product backlog). Each pair will build a component through TDD. We will then add the sections to the big project. Make sure you don’t break your teams tests! Write your test on paper, fail, then add lego to pass. Monday, 11 November, 13
  • 44. Demo time! A few teams will now present their creation. Please share the tests that you came up with and point out the solution. Monday, 11 November, 13
  • 45. Review Test-Driven Development / Design Refactoring Pair Programming A bit of developer speak Experience working on a software team Monday, 11 November, 13
  • 46. Questions? Bryan Beecham @BillyGarnet bbeecham@fusebill.com Mike Bowler @mike_bowler mbowler@gargoylesoftware.com Please separate the lego bricks into their respective colours Monday, 11 November, 13
  • 47. No really, it’s over Monday, 11 November, 13
  • 48. There are no more slides Monday, 11 November, 13
  • 49. No trailers Monday, 11 November, 13
  • 50. Looking for more? Check out http://www.humanrefactor.com Links to HumanRefactoring, and soon more LEGO! Monday, 11 November, 13