Slide 1

Slide 1 text

February 18, 2020 | #TryEnglishLT TDD supports us all the time. You can do that tomorrow. 脱脂綿 ( @anchor_cable )

Slide 2

Slide 2 text

#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.

Slide 3

Slide 3 text

#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

Slide 4

Slide 4 text

4 Agenda #TryEnglishLT TDD change my development. Live coding - if we have a time Brief description of TDD. 1 2 3

Slide 5

Slide 5 text

Brief description of TDD. 1

Slide 6

Slide 6 text

#TryEnglishLT 6 We want “Clean code that works”. works Clean dirty We want here! not works

Slide 7

Slide 7 text

#TryEnglishLT 7 TDD basic flow Red Green Refactor

Slide 8

Slide 8 text

#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

Slide 9

Slide 9 text

#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

Slide 10

Slide 10 text

#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

Slide 11

Slide 11 text

#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

Slide 12

Slide 12 text

#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

Slide 13

Slide 13 text

TDD change my development. 2

Slide 14

Slide 14 text

#TryEnglishLT 14 TDD change my development.

Slide 15

Slide 15 text

#TryEnglishLT 15 Before TDD

Slide 16

Slide 16 text

#TryEnglishLT 16 Developing with TDD We have some checkpoint.

Slide 17

Slide 17 text

Live coding 3

Slide 18

Slide 18 text

#TryEnglishLT 18 TDD practice Cyber-dojo is very easy way to practice TDD. https://cyber-dojo.org/ Let’s write code FizzBuzz.

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

Try it if you are interested. Thank you for listening.

Slide 22

Slide 22 text

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