Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
TDDの練習 Coding Kata の実践
Search
hakobe (Yohei Fushii)
April 19, 2014
Programming
0
1.3k
TDDの練習 Coding Kata の実践
hakobe (Yohei Fushii)
April 19, 2014
Tweet
Share
More Decks by hakobe (Yohei Fushii)
See All by hakobe (Yohei Fushii)
はてなにおけるプログラミング言語の歴史とこれから
hakobe
0
620
ざっとわかるPython
hakobe
4
6.8k
はてなで一人前のエンジニアになる方法
hakobe
3
6.7k
契約による設計の紹介
hakobe
6
20k
アクターによる 並行処理アプケーション アーキテクチャ
hakobe
4
3.3k
Scala In Perl Company
hakobe
11
12k
なめらかにGHEに移行する方法
hakobe
19
7.7k
開発フロー@はてなブックマーク
hakobe
0
150
Git on WebApp with Perl
hakobe
1
3.8k
Other Decks in Programming
See All in Programming
状態管理ライブラリZustandの導入から運用まで
k1tikurisu
3
470
令和トラベルにおけるLLM活用事例:社内ツール開発から得た学びと実践
ippo012
0
140
Kotlin 2.0が与えるAndroid開発の進化
masayukisuda
1
370
Desafios e Lições Aprendidas na Migração de Monólitos para Microsserviços em Java
jessilyneh
2
150
Prompt Cachingは本当に効果的なのか検証してみた.pdf
ttnyt8701
0
530
Amazon BedrockでサーバレスなAIお料理ボットを作成する!!
tosuri13
0
220
大公開!iOS開発の悩みトップ5 〜iOSDC Japan 2024〜
ryunakayama
0
190
開発を加速する共有Swift Package実践
elmetal
PRO
0
410
意外とフォントが大事だった話 / Font Issues on Internationalization
fumi23
0
110
A New Era of Testing
mannodermaus
2
490
あなたのアプリ、ログはでてますか?あるいはログをだしてますか? (Funabashi.dev用 軽量版)
uzulla
2
120
AndroidアプリのUIバリエーションをあの手この手で確認する / Check UI variations of Android apps by various means
tkmnzm
1
140
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
A designer walks into a library…
pauljervisheath
201
24k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
363
22k
How to train your dragon (web standard)
notwaldorf
85
5.6k
Happy Clients
brianwarren
96
6.6k
Fontdeck: Realign not Redesign
paulrobertlloyd
80
5.1k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.6k
The Straight Up "How To Draw Better" Workshop
denniskardys
230
130k
Embracing the Ebb and Flow
colly
83
4.4k
Mobile First: as difficult as doing things right
swwweet
221
8.8k
Automating Front-end Workflow
addyosmani
1365
200k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
230
17k
Transcript
Coding Kata TDD practice with
hakobe hatena: id:hakobe932 twitter: @hakobe github: @hakobe
TDD Test Driven Developement
–Robert C. Martin “ཁ͢ΔʹTDDϓϩͷબͳͷͩɻ ࣮֬ੑɾܽؕࠞೖͷԼɾ༐ؾɾ υΩϡϝϯτɾઃܭΛଅਐ͢Δنͩɻ”
ϓϩͳΒTDDΛ͏
TDDͷࡾݪଇ 1. ࣦഊ͢ΔςετΛॻ͘·Ͱ ϓϩμΫγϣϯίʔυΛॻ͔ͳ͍ 2. ࣦഊͤ͞ΔతҎ֎ͰςετΛॻ͔ͳ͍ 3. ࣦഊ͢Δςετ͕ޭ͢Δ·Ͱ ଞͷϓϩμΫγϣϯίʔυΛॻ͔ͳ͍
Red Green Refactoring TDDͷ αΠΫϧ
࣮ફͰ͖ͯΔ? •͡ΊʹςετΛॻ͘บͰ͖ͯΔ? •͏·͘αΠΫϧΛ·ΘͤͯΔ? •ςετॻ͘ͷ͍͠෦ॻ͚Δ? •Fake It / Obvious Implementation /
Triangulation ͏·͘Ͱ͖ͯΔ?
࿅श
Coding Kata
Coding Kata ۭखͷܕʹͳͧΒ͑ͨɺϓϩάϥϛϯάͷ࿅शํ๏ɻ ! جຊతͳ՝Λ܁Γฦ͠࿅श͢Δ͜ͱͰɺ TDDͷΑ͏ͳنɺΤσΟλͷૢ࡞ํ๏ɺ Α͋͘ΔͷղܾखॱͳͲΛମʹછΈࠐ·ͤΔɻ
ϘϦϯάήʔϜ ‣10ϑϨʔϜ x ࠷େ 2 ͯ͠ 10 ݸͷϐϯΛ͢ ‣ετϥΠΫ Ϙʔφε:
࣍ͷ 2 ͷͨ͠ϐϯ ‣εϖΞ Ϙʔφε: ࣍ͷ 1 ͷͨ͠ϐϯ ‣10ϑϨʔϜ εϖΞ͔ετϥΠΫ͕ग़ͨΒ࠷େ3Ͱ͖Δ
ཁٻ༷ •roll(pins: Int) ϓϨΠϠʔ͕ϘʔϧΛ͛ͨ࣌ʹݺΕΔɻ Ҿͨ͠ϐϯɻ •score(): Int ͜ͷήʔϜͷείΞΛฦ͢ Game +
roll(pins: Int) + score(): Int
࣮ԋ Scala/spec2/IntelliJ/sbt
·ͱΊ • TDDϓϩͷश׳ • Coding KataͰ࿅शͯ͠ʹ͚ͭΑ͏ ࣮ࡍ͏·͍ͬͯ͘Δ? - TDDͷϦζϜ͕ʹͭ͘ -
։ൃڥྑ͘ͳΔ - ϓϩάϥϛϯάݴޠͷػೳΛֶΔ
ࢀߟจݙ • ΞδϟΠϧιϑτΣΞ։ൃͷԞٛ (ISBN: 978-4797347784) • εεϖοΫͷε ʲୈ 1 ճʳ
RSpec ͷ֓ཁ ͱɺRSpec on Rails (Ϟσϧฤ) ( http://magazine.rubyist.net/?0021-Rspec ) • ͜ͷൃදͷαϯϓϧίʔυ ( https:// github.com/hakobe/coding-kata-bowling )