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
41
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
580
IoT Powered by MicroProfile - MakeIT
madsopheim
0
30
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
64
Other Decks in Technology
See All in Technology
ファインディにおけるフロントエンド技術選定の歴史
puku0x
0
180
AIエージェントを5分で一気におさらい!AIエージェント「構築」元年に備えよう
yakumo
1
140
Oracle Cloud Infrastructure:2025年12月度サービス・アップデート
oracle4engineer
PRO
0
200
Cloud WAN MCP Serverから考える新しいネットワーク運用 / 20251228 Masaki Okuda
shift_evolve
PRO
0
140
2025年のデザインシステムとAI 活用を振り返る
leveragestech
0
720
形式手法特論:コンパイラの「正しさ」は証明できるか? #burikaigi / BuriKaigi 2026
ytaka23
16
4.5k
Qiita Bash アドカレ LT #1
okaru
0
170
業務の煩悩を祓うAI活用術108選 / AI 108 Usages
smartbank
9
19k
「駆動」って言葉、なんかカッコイイ_Mitz
comucal
PRO
0
140
First-Principles-of-Scrum
hiranabe
3
1.5k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
60k
AI駆動開発ライフサイクル(AI-DLC)の始め方
ryansbcho79
0
300
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
40
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
76
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
530
Embracing the Ebb and Flow
colly
88
4.9k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
420
Paper Plane
katiecoart
PRO
0
45k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
180
Producing Creativity
orderedlist
PRO
348
40k
Building Applications with DynamoDB
mza
96
6.9k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
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