Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TDD supports us all the time.

827dbd19908541482bac51ace8b86426?s=47 Dassimen
February 18, 2020

TDD supports us all the time.

827dbd19908541482bac51ace8b86426?s=128

Dassimen

February 18, 2020
Tweet

Transcript

  1. February 18, 2020 | #TryEnglishLT TDD supports us all the

    time. You can do that tomorrow. 脱脂綿 ( @anchor_cable )
  2. #TryEnglishLT 2 About Me Dassimen ( @anchor_cable ) • Yumemi

    Inc. ◦ Software Engineer, Backend ◦ PHP / Node.js / TDD / and more • I came here by bicycle. So I’m tired.
  3. #engineers_lt 3 What is TDD? Test-driven development (TDD) is a

    software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the code is improved so that the tests pass. by Wikipedia
  4. 4 Agenda #TryEnglishLT TDD change my development. Live coding -

    if we have a time Brief description of TDD. 1 2 3
  5. Brief description of TDD. 1

  6. #TryEnglishLT 6 We want “Clean code that works”. works Clean

    dirty We want here! not works
  7. #TryEnglishLT 7 TDD basic flow Red Green Refactor

  8. #TryEnglishLT 8 TDD basic flow ①Red: Write a test that

    doesn't work. ②Green: Write code to pass a test. ③Refactor: Refactor with confidence. ④Write a next test. not works works Clean dirty
  9. #TryEnglishLT 9 TDD basic flow ①Red: Write a test that

    doesn't work. ②Green: Write code to pass a test. ③Refactor: Refactor with confidence. ④Write a next test. Clean dirty not works works
  10. #TryEnglishLT 10 TDD basic flow ①Red: Write a test that

    doesn't work. ②Green: Write code to pass a test. ③Refactor: Refactor with confidence. ④Write a next test. Clean dirty not works works
  11. #TryEnglishLT 11 TDD basic flow ①Red: Write a test that

    doesn't work. ②Green: Write code to pass a test. ③Refactor: Refactor with confidence. ④Write a next test. Clean dirty not works works
  12. #TryEnglishLT 12 TDD basic flow ①Red: Write a test that

    doesn't work. ②Green: Write code to pass a test. ③Refactor: Refactor with confidence. ④Write a next test. Clean dirty not works works
  13. TDD change my development. 2

  14. #TryEnglishLT 14 TDD change my development.

  15. #TryEnglishLT 15 Before TDD

  16. #TryEnglishLT 16 Developing with TDD We have some checkpoint.

  17. Live coding 3

  18. #TryEnglishLT 18 TDD practice Cyber-dojo is very easy way to

    practice TDD. https://cyber-dojo.org/ Let’s write code FizzBuzz.
  19. 19 Try TDD ex.FizzBuzz 1. Make a ToDo list. When

    you get 1, return 1. When you get 3, return “Fizz”.... 2. Write a test. assertEqual(1,judgeFizzBuzz(1)) 3. Check for failed tests. 4. Write a production code to pass the test. return 1; 5. Refactor your code. #TryEnglishLT
  20. 20 Summary #TryEnglishLT • TDD change us:small step, you can

    reach goal someday • Live coding:you can try TDD that tomorrow • TDD basic flow:Red→Green→Refactor
  21. Try it if you are interested. Thank you for listening.

  22. 22 Appendix Book: https://www.amazon.co.jp/dp/4274217884/ref=cm_sw_r_tw_dp_U_x_BWLBDb7XS8 DYV Qiita:https://qiita.com/anchor-cable/items/4b7b73bc1a2163ded6b6 #TryEnglishLT