Treat yourself - A tale about dogtraining and test driven development

6fe15a7e096eb9517a201a249e57aa80?s=47 Mirjam
February 06, 2020

Treat yourself - A tale about dogtraining and test driven development

Slides to my keynote at European Testing Conference 2020 in Amsterdam.
You can find the code example on github:
https://github.com/programmiri/examples-talk-tdd-dogtraining

6fe15a7e096eb9517a201a249e57aa80?s=128

Mirjam

February 06, 2020
Tweet

Transcript

  1. Treat yourself A TALE ABOUT DOG TRAINING AND TEST DRIVEN

    DEVELOPMENT
  2. HI! !

  3. I ! TESTING Image src: https://www.youtube.com/watch?v=dQw4w9WgXcQ

  4. MFW SOMEONE SAYS THEY don't like testing Image src: https://giphy.com/gifs/reaction-dogs-texting-RGK9jWz0t89Hy

  5. THE PERFECT JOB DOES NOT EXI—

  6. I WAS A DOG TRAINER

  7. Image src: https://giphy.com/gifs/truthorange-dog-surprised-wtf-xThuW7icYBlQZxjnyg

  8. SO... HOW TO TRAIN A DOG, MIRJAM? Original image: https://www.flickr.com/photos/lovine/5433988749

  9. Teach your dog WHAT TO DO Video src: https://giphy.com/gifs/cat-dog-trick-2J2XDIiYBFIu4

  10. Dogs do things when IT'S WORTH IT Image src: https://giphy.com/gifs/happiness-9fuvOqZ8tbZOU

  11. WORK WITH your dogs brain Video src: https://www.youtube.com/watch?v=EbJ5J5SE6ws

  12. Always have a POSITIVE GOAL Image src: https://giphy.com/gifs/cute-aww-eyebleach-2yqyKvK47qaea8IdnV

  13. Take the SMALLEST STEPS Image src: https://i.imgur.com/REevAsi.gifv

  14. BACK TO CODE Image src: https://i.imgur.com/REevAsi.gifv

  15. Test Driven DEVELOPMENT

  16. TEST DRIVEN DEVELOPMENT Tests first

  17. TEST DRIVEN DEVELOPMENT - how Red - Green - Refactor

    Image src: https://giphy.com/gifs/peteandpete-season-3-the-adventures-of-pete-and-3o7Z4tNIWOQWTlfGN2
  18. TDD CYCLE ❌ Write a test. ❌ That test fails

    - obviously ❌ Write code that makes the test pass ✅ Test pass! # Refactor Rinse and repeat! Image src: https://giphy.com/gifs/girl-yeah-wash-JS88XIgg7laNO
  19. BUT WHY?

  20. Image src: https://martinfowler.com/bliki/TestPyramid.html

  21. LET'S WRITE SOME ✨ tests

  22. DOG TRAINING SIMULATOR TASK Program to show others how to

    train a specific behavior to a dog.
  23. DOG TRAINING SIMULATOR USER STORY I have a dog and

    I want to teach this dog the behavior "Touch", using positive reinforcement as a technique.
  24. DOG TRAINING SIMULATOR INITIAL SITUATION - no past no conditioning

    - rewarding, neutral and punishing consequences - visible reactions to consequences
  25. DOG TRAINING SIMULATOR My training will be successful when... -

    I say "Touch" - and hold two fingers so my dog can access them, - my dog comes immediately and - with a joyful body language to me and - presses its nose at the two fingers shortly.
  26. LET'S THINK ABOUT THIS

  27. ✋ STOP!

  28. RED GREEN REFACTOR

  29. None
  30. None
  31. None
  32. None
  33. None
  34. None
  35. None
  36. None
  37. !"#

  38. None
  39. None
  40. None
  41. None
  42. Take little steps!

  43. None
  44. None
  45. None
  46. None
  47. None
  48. None
  49. None
  50. None
  51. !

  52. None
  53. None
  54. None
  55. !

  56. None
  57. None
  58. None
  59. None
  60. None
  61. None
  62. None
  63. None
  64. None
  65. None
  66. None
  67. None
  68. None
  69. None
  70. None
  71. None
  72. None
  73. None
  74. None
  75. None
  76. None
  77. None
  78. None
  79. None
  80. None
  81. None
  82. None
  83. SUMMARY

  84. WHAT - imho - TDD IS ABOUT TDD is not

    only a strategy for tests, it's a strategy for design. It helps to stay focused and keep things simple. It makes changes easier and refactoring safer. You can work in quick iterations and get in a very motivating feedback loop.
  85. TESTER ! DEVELOPER How it brings us together - help

    developers to refine tests - build a balanced testing pyramid together Image src: https://giphy.com/gifs/dog-hug-sX755wvr2Q6gE
  86. THANKS A LawhoooooOT