Test DrivenDevelopment Pittsburgh Agile Group      May 24, 2011                 Copyright 2011 LeanDog, Inc. All Rights Re...
Our TestsIt == This Presentation               Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute...
Our Tests   It == This Presentation• it should define TDD                        Copyright 2011 LeanDog, Inc. All Rights Re...
Our Tests   It == This Presentation• it should define TDD• it should explain why TDD works                       Copyright ...
Our Tests    It == This Presentation• it should define TDD• it should explain why TDD works• it should explain why you shou...
Our Tests     It == This Presentation•   it should define TDD•   it should explain why TDD works•   it should explain why y...
What is TDD?        Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
What is TDD?• Simple, high-feedback incremental coding  technique                         Copyright 2011 LeanDog, Inc. All...
What is TDD?• Simple, high-feedback incremental coding  technique • Write tests as specs prior to code                    ...
What is TDD?• Simple, high-feedback incremental coding  technique • Write tests as specs prior to code • Immediate feedbac...
Core of the cycle           Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
History of TDD         Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
History of TDD         Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
History of TDD• Devised by Ward  Cunningham                    Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not co...
History of TDD• Devised by Ward  Cunningham • Honed by Kent Beck                        Copyright 2011 LeanDog, Inc. All R...
History of TDD• Devised by Ward  Cunningham • Honed by Kent Beck • Incorporated as one of XP’s   practices                ...
History of TDD• Devised by Ward  Cunningham • Honed by Kent Beck • Incorporated as one of XP’s   practices• Buzzword Histo...
History of TDD• Devised by Ward  Cunningham • Honed by Kent Beck • Incorporated as one of XP’s   practices• Buzzword Histo...
History of TDD• Devised by Ward  Cunningham • Honed by Kent Beck • Incorporated as one of XP’s   practices• Buzzword Histo...
History of TDD• Devised by Ward  Cunningham • Honed by Kent Beck • Incorporated as one of XP’s   practices• Buzzword Histo...
TDD and Testing         Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
TDD and Testing• Creates testable code  by definition                          Copyright 2011 LeanDog, Inc. All Rights Rese...
TDD and Testing• Creates testable code  by definition  • Obvious but significant                             Copyright 2011 ...
TDD and Testing• Creates testable code  by definition  • Obvious but significant  • Writing tests after code    built is muc...
TDD and Testing• Creates testable code  by definition  • Obvious but significant  • Writing tests after code    built is muc...
TDD and Testing• Creates testable code  by definition  • Obvious but significant  • Writing tests after code    built is muc...
More Importantly...           Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permissi...
More Importantly...• Promotes better design                       Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not...
More Importantly...• Promotes better design • Teaches you how to design isolated classes                             Copyr...
More Importantly...• Promotes better design    • Teaches you how to design isolated classes•    Creates comprehensive deve...
More Importantly...• Promotes better design    • Teaches you how to design isolated classes•    Creates comprehensive deve...
TDD Rules      Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
TDD Rules• Test everything that  could possibly break                         Copyright 2011 LeanDog, Inc. All Rights Rese...
TDD Rules• Test everything that  could possibly break• Do not write any  production code until  you have a failing test   ...
TDD Rules• Test everything that  could possibly break• Do not write any  production code until  you have a failing test• C...
Our Tests     It == This Presentation•   it should define TDD•   it should explain why TDD works•   it should explain why y...
Our Tests     It == This Presentation•   it should define TDD•   it should explain why TDD works•   it should explain why y...
Why does it work?          Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Why does it work?Pleasure spiked with Pain!               Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or...
Why does it work?Pleasure spiked with Pain!               Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or...
Why does it work?Pleasure spiked with Pain!               Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or...
Long Methods        Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Long Methods   Pain!        Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Many Dependencies          Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Many Dependencies      Pain!          Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without ...
Doing too much         Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Doing too much    Pain!         Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permis...
Keep it clean        Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Keep it clean Pleasure        Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permissi...
Feel goodPleasure      Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Our Tests     It == This Presentation•   it should define TDD•   it should explain why TDD works•   it should explain why y...
Our Tests     It == This Presentation•   it should define TDD•   it should explain why TDD works•   it should explain why y...
Nature^F      T>           Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Nature                                           X^F      T>           Copyright 2011 LeanDog, Inc. All Rights Reserved. D...
Nature                                           X^F      T>           Copyright 2011 LeanDog, Inc. All Rights Reserved. D...
Nature                                           X^F      T>           Copyright 2011 LeanDog, Inc. All Rights Reserved. D...
Nature                                           X^F      T>           Copyright 2011 LeanDog, Inc. All Rights Reserved. D...
Nature                                           X^F      T>           Copyright 2011 LeanDog, Inc. All Rights Reserved. D...
Design Evolves         Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Design Evolves         Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Design Evolves         Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Design Evolves         Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Design Evolves         Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Design Evolves         Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Fewer Defectshttp://research.microsoft.com/en-us/projects/esm/                 nagappan_tdd.pdf                           ...
We Do Scrum!       Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
We Do Scrum!       Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
We Do Scrum!       Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Professionalism         Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Our Tests     It == This Presentation•   it should define TDD•   it should explain why TDD works•   it should explain why y...
Our Tests     It == This Presentation•   it should define TDD•   it should explain why TDD works•   it should explain why y...
Demo Time      Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Our Tests     It == This Presentation•   it should define TDD•   it should explain why TDD works•   it should explain why y...
Our Tests     It == This Presentation•   it should define TDD•   it should explain why TDD works•   it should explain why y...
Final Thoughts         Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
Final Thoughts• TDD is here to stay                        Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy o...
Final Thoughts• TDD is here to stay • A satisfying and enriching practice that can    dramatically increase the quality of...
Final Thoughts• TDD is here to stay • A satisfying and enriching practice that can    dramatically increase the quality of...
Final Thoughts• TDD is here to stay • A satisfying and enriching practice that can    dramatically increase the quality of...
Presentation for Pittsburgh Agile Group
Upcoming SlideShare
Loading in …5
×

Presentation for Pittsburgh Agile Group

769 views

Published on

This is a talk I gave at the Pittsburgh Agile Group on 24 May 2011.

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

  • Be the first to like this

No Downloads
Views
Total views
769
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Presentation for Pittsburgh Agile Group

    1. 1. Test DrivenDevelopment Pittsburgh Agile Group May 24, 2011 Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    2. 2. Our TestsIt == This Presentation Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    3. 3. Our Tests It == This Presentation• it should define TDD Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    4. 4. Our Tests It == This Presentation• it should define TDD• it should explain why TDD works Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    5. 5. Our Tests It == This Presentation• it should define TDD• it should explain why TDD works• it should explain why you should do TDD Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    6. 6. Our Tests It == This Presentation• it should define TDD• it should explain why TDD works• it should explain why you should do TDD• it should demonstrate TDD Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    7. 7. What is TDD? Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    8. 8. What is TDD?• Simple, high-feedback incremental coding technique Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    9. 9. What is TDD?• Simple, high-feedback incremental coding technique • Write tests as specs prior to code Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    10. 10. What is TDD?• Simple, high-feedback incremental coding technique • Write tests as specs prior to code • Immediate feedback Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    11. 11. Core of the cycle Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    12. 12. History of TDD Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    13. 13. History of TDD Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    14. 14. History of TDD• Devised by Ward Cunningham Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    15. 15. History of TDD• Devised by Ward Cunningham • Honed by Kent Beck Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    16. 16. History of TDD• Devised by Ward Cunningham • Honed by Kent Beck • Incorporated as one of XP’s practices Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    17. 17. History of TDD• Devised by Ward Cunningham • Honed by Kent Beck • Incorporated as one of XP’s practices• Buzzword History Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    18. 18. History of TDD• Devised by Ward Cunningham • Honed by Kent Beck • Incorporated as one of XP’s practices• Buzzword History • Test-first programming Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    19. 19. History of TDD• Devised by Ward Cunningham • Honed by Kent Beck • Incorporated as one of XP’s practices• Buzzword History • Test-first programming • Test-first design Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    20. 20. History of TDD• Devised by Ward Cunningham • Honed by Kent Beck • Incorporated as one of XP’s practices• Buzzword History • Test-first programming • Test-first design • Test-driven development Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    21. 21. TDD and Testing Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    22. 22. TDD and Testing• Creates testable code by definition Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    23. 23. TDD and Testing• Creates testable code by definition • Obvious but significant Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    24. 24. TDD and Testing• Creates testable code by definition • Obvious but significant • Writing tests after code built is much harder Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    25. 25. TDD and Testing• Creates testable code by definition • Obvious but significant • Writing tests after code built is much harder • Therefore fewer tests get written Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    26. 26. TDD and Testing• Creates testable code by definition • Obvious but significant • Writing tests after code built is much harder • Therefore fewer tests get written• Minimizes defects Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    27. 27. More Importantly... Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    28. 28. More Importantly...• Promotes better design Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    29. 29. More Importantly...• Promotes better design • Teaches you how to design isolated classes Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    30. 30. More Importantly...• Promotes better design • Teaches you how to design isolated classes• Creates comprehensive developer documentation Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    31. 31. More Importantly...• Promotes better design • Teaches you how to design isolated classes• Creates comprehensive developer documentation• Development Pacing Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    32. 32. TDD Rules Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    33. 33. TDD Rules• Test everything that could possibly break Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    34. 34. TDD Rules• Test everything that could possibly break• Do not write any production code until you have a failing test Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    35. 35. TDD Rules• Test everything that could possibly break• Do not write any production code until you have a failing test• Code is not checked in until 100% of unit tests run Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    36. 36. Our Tests It == This Presentation• it should define TDD• it should explain why TDD works• it should explain why you should do TDD• it should demonstrate TDD Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    37. 37. Our Tests It == This Presentation• it should define TDD• it should explain why TDD works• it should explain why you should do TDD• it should demonstrate TDD Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    38. 38. Why does it work? Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    39. 39. Why does it work?Pleasure spiked with Pain! Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    40. 40. Why does it work?Pleasure spiked with Pain! Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    41. 41. Why does it work?Pleasure spiked with Pain! Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    42. 42. Long Methods Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    43. 43. Long Methods Pain! Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    44. 44. Many Dependencies Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    45. 45. Many Dependencies Pain! Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    46. 46. Doing too much Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    47. 47. Doing too much Pain! Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    48. 48. Keep it clean Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    49. 49. Keep it clean Pleasure Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    50. 50. Feel goodPleasure Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    51. 51. Our Tests It == This Presentation• it should define TDD• it should explain why TDD works• it should explain why you should do TDD• it should demonstrate TDD Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    52. 52. Our Tests It == This Presentation• it should define TDD• it should explain why TDD works• it should explain why you should do TDD• it should demonstrate TDD Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    53. 53. Nature^F T> Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    54. 54. Nature X^F T> Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    55. 55. Nature X^F T> Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    56. 56. Nature X^F T> Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    57. 57. Nature X^F T> Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    58. 58. Nature X^F T> Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    59. 59. Design Evolves Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    60. 60. Design Evolves Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    61. 61. Design Evolves Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    62. 62. Design Evolves Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    63. 63. Design Evolves Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    64. 64. Design Evolves Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    65. 65. Fewer Defectshttp://research.microsoft.com/en-us/projects/esm/ nagappan_tdd.pdf Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    66. 66. We Do Scrum! Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    67. 67. We Do Scrum! Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    68. 68. We Do Scrum! Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    69. 69. Professionalism Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    70. 70. Our Tests It == This Presentation• it should define TDD• it should explain why TDD works• it should explain why you should do TDD• it should demonstrate TDD Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    71. 71. Our Tests It == This Presentation• it should define TDD• it should explain why TDD works• it should explain why you should do TDD• it should demonstrate TDD Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    72. 72. Demo Time Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    73. 73. Our Tests It == This Presentation• it should define TDD• it should explain why TDD works• it should explain why you should do TDD• it should demonstrate TDD Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    74. 74. Our Tests It == This Presentation• it should define TDD• it should explain why TDD works• it should explain why you should do TDD• it should demonstrate TDD Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    75. 75. Final Thoughts Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    76. 76. Final Thoughts• TDD is here to stay Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    77. 77. Final Thoughts• TDD is here to stay • A satisfying and enriching practice that can dramatically increase the quality of your application Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    78. 78. Final Thoughts• TDD is here to stay • A satisfying and enriching practice that can dramatically increase the quality of your application• Diligent adherence to practice is required to succeed Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.
    79. 79. Final Thoughts• TDD is here to stay • A satisfying and enriching practice that can dramatically increase the quality of your application• Diligent adherence to practice is required to succeed • But the benefits are worth it Copyright 2011 LeanDog, Inc. All Rights Reserved. Do not copy or distribute without permission.

    ×