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
590
ざっとわかるPython
hakobe
4
6.7k
はてなで一人前のエンジニアになる方法
hakobe
3
6.6k
契約による設計の紹介
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
CSC307 Lecture 06
javiergs
PRO
0
360
GraphQL はいいぞ! ~Laravel で学ぶ GraphQL 入門~
azuki
1
160
Rustのweb開発を助ける 便利なツール紹介
yuki0418
1
190
Product Management LT会_クアンド新家
shinshin
0
210
Jetpack for KMP
fornewid
1
290
Advanced App Shrinking Techniques
cbeyls
2
150
スクラムマスターって孤独じゃないですか?
yoshitaroyoyo
1
140
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Berlin
prof18
0
110
今こそ始める、CDKコンストラクトライブラリ開発 ― 入門から実践まで
tmokmss
1
930
AWSでゲームサーバーを運用! Amazon GameLiftのお話
iriikeita
0
200
SDCon2024: Enabling DevOps and Team Topologies thru architecture: architecting for fast flow
cer
PRO
0
780
Xcode 16のPreviewModifierと@Previewableを活用した効率的なプレビュー方法の考察
ojun9
2
160
Featured
See All Featured
The Invisible Customer
myddelton
117
13k
GraphQLとの向き合い方2022年版
quramy
36
13k
Infographics Made Easy
chrislema
238
18k
5 minutes of I Can Smell Your CMS
philhawksworth
200
19k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.3k
Bash Introduction
62gerente
607
210k
Agile that works and the tools we love
rasmusluckow
325
20k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
78
15k
Faster Mobile Websites
deanohume
303
30k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
12
3.8k
Creatively Recalculating Your Daily Design Routine
revolveconf
214
11k
A Tale of Four Properties
chriscoyier
155
22k
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 )