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
9 ways to test your spaghetti code
Search
Mads Opheim
May 30, 2019
Technology
0
47
9 ways to test your spaghetti code
From Nordic Testing Days 2019
Mads Opheim
May 30, 2019
Tweet
Share
More Decks by Mads Opheim
See All by Mads Opheim
Modern Java App Development in the Cloud
madsopheim
0
53
IoT Powered by MicroProfile - JFuture
madsopheim
0
590
IoT Powered by MicroProfile - MakeIT
madsopheim
0
36
IoT powered by MicroProfile
madsopheim
0
37
9 ways to test your spaghetti code
madsopheim
0
130
Domain driven design in the real world
madsopheim
0
390
Make your tests tell the story of your domain
madsopheim
0
93
IoT powered by MicroProfile
madsopheim
0
51
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
madsopheim
0
65
Other Decks in Technology
See All in Technology
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.4k
Agent Skils
dip_tech
PRO
0
130
コミュニティが変えるキャリアの地平線:コロナ禍新卒入社のエンジニアがAWSコミュニティで見つけた成長の羅針盤
kentosuzuki
0
130
今こそ学びたいKubernetesネットワーク ~CNIが繋ぐNWとプラットフォームの「フラッと」な対話
logica0419
5
400
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
2k
登壇駆動学習のすすめ — CfPのネタの見つけ方と書くときに意識していること
bicstone
3
130
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
200
2026年、サーバーレスの現在地 -「制約と戦う技術」から「当たり前の実行基盤」へ- /serverless2026
slsops
2
270
AIエージェントに必要なのはデータではなく文脈だった/ai-agent-context-graph-mybest
jonnojun
1
240
【Ubie】AIを活用した広告アセット「爆速」生成事例 | AI_Ops_Community_Vol.2
yoshiki_0316
1
120
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
840
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
150
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
0
350
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Utilizing Notion as your number one productivity tool
mfonobong
3
220
It's Worth the Effort
3n
188
29k
RailsConf 2023
tenderlove
30
1.3k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
260
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
110
30 Presentation Tips
portentint
PRO
1
220
Transcript
Nordic Testing Days 9 ways to test your spaghetti code
Mads Opheim @MadsOpheim 1
Tere! I’m Mads. I’m a developer 2
Spaghetti code? 3
The 9 ways 4
5 1. Test all or Test small
6 2. Set your dependencies
7
Singletons 8
3. Package-protect problematic parts 9
Tools for your toolbox 10
4. Do simple refactorings to get your code under test
11
In general: untangling and looking at one part at a
time 12
You’re not as smart as you think you are 13
Well-designed code is testable code 14
15 5. Help your team
You’ll forget things 16
6. Run your tests - and care 17
7. Feature toggles 18
8. One mile at a time 19
Refactor in separate commits 20
9. Test-driven development 21
Test-driven spaghetti 22
TDD on legacy code in practice 23
Tip 10, 11 and onwards 24
25 The Deadline For Kunngjøring Is Four Weeks()
26 Properties For Namsmann Mainly Follow The Same Rules as
Hovedstevnevitne()
You’ll do stupid things - and that’s ok 27
Be consistent 28
Give me more @lisacrispin, @lisihocke, @techgirl1908, @maaretp... 29
Key takeaways 30 1. Good code design improves testability 2.
TDD on spaghetti code: TDD + test spaghetti code 3. Write tests for you legacy code - you can do it!
Thank you! @MadsOpheim
[email protected]
31