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
Writing testable code
Search
Rodrigo Boniatti
November 30, 2019
Programming
0
64
Writing testable code
Rodrigo Boniatti
November 30, 2019
Tweet
Share
More Decks by Rodrigo Boniatti
See All by Rodrigo Boniatti
Challenges of the modern web
boniatti
0
15
The pillars of integration
boniatti
0
74
Designing and building software with Ruby on Rails
boniatti
0
57
Mobile development with React Native
boniatti
1
3.5k
Other Decks in Programming
See All in Programming
CSC307 Lecture 03
javiergs
PRO
1
470
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
130
SQL Server 2025 LT
odashinsuke
0
130
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
440
AtCoder Conference 2025
shindannin
0
920
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
6
1k
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
180
Patterns of Patterns
denyspoltorak
0
420
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
2.1k
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
160
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
770
ゲームの物理 剛体編
fadis
0
400
Featured
See All Featured
We Are The Robots
honzajavorek
0
130
Become a Pro
speakerdeck
PRO
31
5.8k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
115
100k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
38
Crafting Experiences
bethany
0
27
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
230
Documentation Writing (for coders)
carmenintech
77
5.2k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
2
3.9k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
82
Amusing Abliteration
ianozsvald
0
84
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Transcript
Writing testable code
Rodrigo Boniatti Developer at Codeminer 42 @boniattirodrigo rodrigoboniatti.com
Conditionals
None
Smell
None
None
Refactored
None
None
Conditionals • Smell: • High cyclomatic complexity score; • How
to solve? • Replace Conditional with Polymorphism;
Global state
Smell
None
Refactored
None
Global state • Smell: • Coupling; • How to solve?
• Dependency injection;
Life cycle events
Smell
None
Refactored
None
Life cycle events • Smell: • Hide code behavior; •
No execution order; • How to solve? • Single flow;
Principles of testing
Principles of testing • Test in isolation; • A lot
of setup == smell; • Hard to test == smell;
Questions?
Thank you Code examples: https://github.com/boniattirodrigo/writing-testable-code