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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
20
The pillars of integration
boniatti
0
79
Designing and building software with Ruby on Rails
boniatti
0
59
Mobile development with React Native
boniatti
1
3.5k
Other Decks in Programming
See All in Programming
Implementation Patterns
denyspoltorak
0
280
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
Architectural Extensions
denyspoltorak
0
270
CSC307 Lecture 01
javiergs
PRO
0
690
AI & Enginnering
codelynx
0
110
Fluid Templating in TYPO3 14
s2b
0
130
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
4
310
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
250
CSC307 Lecture 04
javiergs
PRO
0
660
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.9k
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
Vibe codingでおすすめの言語と開発手法
uyuki234
0
220
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
100
GraphQLとの向き合い方2022年版
quramy
50
14k
Google's AI Overviews - The New Search
badams
0
900
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
GitHub's CSS Performance
jonrohan
1032
470k
How to Ace a Technical Interview
jacobian
281
24k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
Statistics for Hackers
jakevdp
799
230k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
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