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

TDD supports us all the time.

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →
Dassimen
February 18, 2020

TDD supports us all the time.

Dassimen

February 18, 2020

Transcript

22 slides
  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. #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
  6. #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
  7. #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
  8. #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
  9. #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
  10. #TryEnglishLT 18 TDD practice Cyber-dojo is very easy way to

    practice TDD. https://cyber-dojo.org/ Let’s write code FizzBuzz.
  11. 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
  12. 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

More Decks by Dassimen

Other Decks in Programming