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
Yay! Mocks!
Search
Corey Haines
June 26, 2012
Programming
4
300
Yay! Mocks!
Discussion about usage of test-doubles in driving design
Corey Haines
June 26, 2012
Tweet
Share
More Decks by Corey Haines
See All by Corey Haines
Getting the most out of a conference
coreyhaines
3
240
Other Decks in Programming
See All in Programming
iOSアプリの信頼性を向上させる取り組み/ios-app-improve-reliability
shino8rayu9
0
120
(Extension DC 2025) Actor境界を越える技術
teamhimeh
1
100
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
2.3k
defer f()とdefer fの挙動を 誤解していた話
kogamochiduki
2
150
Breaking Up with Big ViewModels — Without Breaking Your Architecture (droidcon Berlin 2025)
steliosf
PRO
1
270
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
790
PostgreSQLで手軽にDuckDBを使う!DuckDB&pg_duckdb入門/osk2025-duckdb
takahashiikki
1
230
気づいて!アプリからのSOS 〜App Store Connect APIで始めるパフォーマンス健康診断〜
waka12
0
250
プロダクト開発をAI 1stに変革する〜SaaS is dead時代で生き残るために〜 / AI 1st Product Development
kobakei
0
440
Web技術を最大限活用してRAW画像を現像する / Developing RAW Images on the Web
ssssota
2
980
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
1
310
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
150
Featured
See All Featured
The Invisible Side of Design
smashingmag
301
51k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
GitHub's CSS Performance
jonrohan
1032
460k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
114
20k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.1k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
Unsuck your backbone
ammeep
671
58k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Raft: Consensus for Rubyists
vanstee
139
7.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Transcript
Tuesday, June 26, 2012
YAY! Mocks! @coreyhaines Nordicy RubyConf 2012 Tuesday, June 26, 2012
YAY! Test Doubles! @coreyhaines Nordicy RubyConf 2012 Tuesday, June 26,
2012
Zak! Tuesday, June 26, 2012
Test-Driven Development Tuesday, June 26, 2012
Object-Oriented is about messages Tuesday, June 26, 2012
Object-Oriented is about interactions Tuesday, June 26, 2012
Object-Oriented is about services Tuesday, June 26, 2012
Roles vs Things Tuesday, June 26, 2012
Test-Driven Development Tuesday, June 26, 2012
Test-First Development Tuesday, June 26, 2012
Test-Driven vs Test-First Tuesday, June 26, 2012
Reaction to pain Tuesday, June 26, 2012
Test-First -> Change Tests Tuesday, June 26, 2012
Test-Driven -> Change Design Tuesday, June 26, 2012
Test-Doubles Often Highlight Pain Tuesday, June 26, 2012
Zak! Tuesday, June 26, 2012
Examples Tuesday, June 26, 2012
Showing list of Coderetreats for today Tuesday, June 26, 2012
You have to change your test When you change this
hash Tuesday, June 26, 2012
Feels Very Fragile Tuesday, June 26, 2012
PAIN! Tuesday, June 26, 2012
Discomfort! Tuesday, June 26, 2012
Tuesday, June 26, 2012
Why is this information relevant to the controller? Tuesday, June
26, 2012
Bypassing Layers Tuesday, June 26, 2012
This is odd Tuesday, June 26, 2012
Controller calling database? Tuesday, June 26, 2012
Controller should know ‘WHAT’ not ‘HOW’ Tuesday, June 26, 2012
Better to insert a layer Tuesday, June 26, 2012
Controller Business-Oriented Services DB Tuesday, June 26, 2012
What, not How Tuesday, June 26, 2012
Better to delegate the How Tuesday, June 26, 2012
TDD is about design Tuesday, June 26, 2012
Change design, not tests Tuesday, June 26, 2012
Focusing on usage Tuesday, June 26, 2012
I like Presenters! Tuesday, June 26, 2012
Tuesday, June 26, 2012
double depending on doubles?? Tuesday, June 26, 2012
UGH! Tuesday, June 26, 2012
Too much detail at this level? Jumping levels of abstraction?
Tuesday, June 26, 2012
Change design to fix pain Tuesday, June 26, 2012
Simplify our example Tuesday, June 26, 2012
Simplify our example Tuesday, June 26, 2012
Much simpler, more focused on what the controller needs to
know Tuesday, June 26, 2012
Tuesday, June 26, 2012
TDD is about refactoring Tuesday, June 26, 2012
TDD is about refactoring away from discomfort Tuesday, June 26,
2012
Changing your design, to fix pain Tuesday, June 26, 2012
Test doubles can help highlight and fix pain Tuesday, June
26, 2012
Take-Home Challenge Tuesday, June 26, 2012
Tuesday, June 26, 2012
Coupled Roles Tuesday, June 26, 2012
Unnecessary noise Tuesday, June 26, 2012
or false positive if yesterday’s or tomorrow’s are not created
in database Tuesday, June 26, 2012
How to change design to fix this? Tuesday, June 26,
2012
Thanks! @coreyhaines Nordicy RubyConf 2012 font inspiration: bit.ly/corey-sans Tuesday, June
26, 2012