Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Atlantec - tdd lessons

2,409 views

Published on

Atlantec conference, Galway, May 5th

Published in: Software
  • Be the first to comment

Atlantec - tdd lessons

  1. 1. @JonJagger jon@jaggersoft.com TDD Lessons
  2. 2. 2
  3. 3. 3
  4. 4. 4 Bray
  5. 5. 5
  6. 6. 6
  7. 7. 7
  8. 8. 8
  9. 9. 9
  10. 10. 10
  11. 11. 11
  12. 12. 12
  13. 13. 13
  14. 14. 14
  15. 15. 15
  16. 16. 16
  17. 17. 17
  18. 18. 18
  19. 19. 19
  20. 20. 20
  21. 21. 21 cyber-dojo.org server
  22. 22. 22 cyber-dojo.org server git commit
  23. 23. 23 cyber-dojo.org server
  24. 24. 24 cyber-dojo.org server
  25. 25. 25
  26. 26. 26 one or more tests failed
  27. 27. 27 all tests passed
  28. 28. 28 syntax error
  29. 29. 29
  30. 30. 30
  31. 31. 31
  32. 32. 32 team
  33. 33. 33
  34. 34. 34
  35. 35. 35 review dashboard
  36. 36. 36 oldest newest summaries
  37. 37. 37 1 minute
  38. 38. 38
  39. 39. 39 diff
  40. 40. 40
  41. 41. 41 cyber-dojo.org has ~ 30,000 cyber-dojos
  42. 42. 42 …some data… from a random sample of 500
  43. 43. 43 colour-to-colour diff deltas 3.94 5.39 4.67 4.65 7.52 6.01 17.67 average lines of code added+deleted 13.65 bigger delta == greater chance of amber
  44. 44. 44 bigger delta == greater chance of amber
  45. 45. 45 11 5 6 lots of amber runs
  46. 46. 46 colour-to-colour percentages 7.0% 7.8% 8.0% 8.1% 8.4% 11.1% 11.2% 11.3% 27.1% lots of amber to amber
  47. 47. for example 45 minute exercise
  48. 48. code
  49. 49. test?
  50. 50. FizzBuzz 50
  51. 51. waterfail 45 minute exercise test 9 month project
  52. 52. waterfail test 8 months 1 month
  53. 53. waterfail test > 8 months < 1 month
  54. 54. waterfail
  55. 55. waterfail test test test test test test test test test test test test test test test tes tes tes
  56. 56. debugging!
  57. 57. 57 debugging == removing what you don't want
  58. 58. 58 suppose you manage to remove what you don't want
  59. 59. 59 will you be left with what you do want?
  60. 60. 60 it’s like making toast by burning bread and then scraping the burn off!
  61. 61. 61
  62. 62. specifying debugging
  63. 63. DDD TDD
  64. 64. specifying specifications specifications
  65. 65. 65 tests
  66. 66. 66 specifications
  67. 67. 67 specific?
  68. 68. 68 !
  69. 69. 69 specific
  70. 70. 70
  71. 71. 71 suppose you’ve measured the complexity of your code and tests
  72. 72. 72 larger number == more complexity
  73. 73. 73 2.1 the average complexity of the code is
  74. 74. 74 by the way…
  75. 75. 75 did you hear the one about the statistician who drowned crossing a river only six inches deep*
  76. 76. 76 did you hear the one about the statistician who drowned crossing a river only six inches deep* *average depth!
  77. 77. 77 3.7 the average complexity of the tests is
  78. 78. tests 3.7 2.1 code 78
  79. 79. 79 tests tests 11.2 tests 3.7 2.1 code
  80. 80. 80 tests tests 11.2 tests 3.7 2.1 code NO!
  81. 81. tests 2.0 2.1 code 81 < < is the less than operator
  82. 82. tests 1.6 2.1 code 82 << << is the much less than operator
  83. 83. tests 1.0 2.1 code 83 YES <<< <<< is the much much less than operator
  84. 84. tests 1.0 2.1 code 84 teststeststests YES <<<
  85. 85. 85 example
  86. 86. 86 example
  87. 87. 87
  88. 88. 88 red green refactor
  89. 89. refactor write a test for new functionality implement the new functionality
  90. 90. refactor write a test for new functionality implement the new functionality
  91. 91. refactor write a test for new functionality implement the new functionality improve the diagnostic
  92. 92. 92 diagnostics that diagnose!
  93. 93. refactor write a test for new functionality implement the new functionality improve the diagnostic coding testing
  94. 94. 94 Test Driven Development
  95. 95. 95 why do cars have brakes?
  96. 96. 96 so you can drive faster
  97. 97. 97
  98. 98. 98 feedback test test test test test
  99. 99. 99 just calling it feedback doesn’t mean it has actually fed back!
  100. 100. 100
  101. 101. 101 senses pancreas senses liver & muscles causes glycogen causes Hyperglycemia pancreas senses glucagoncauses senses causes insulin causes Hypoglycemia causes
  102. 102. 102 all change can be understood as the effort to maintain some constancy, and all constancy as maintained through change
  103. 103. 103 Henri Louis Le Chatelier systems tend to oppose their own proper function
  104. 104. 104 coding testing
  105. 105. 105 the battle is a means or process of generating, maintaining, and stabilising a system
  106. 106. 106 evolution is always co-evolution
  107. 107. 107 a co-evolving system coding testing
  108. 108. @JonJagger jon@jaggersoft.com TDD Lessons

×