Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
9 ways to test your spaghetti code
Search
Mads Opheim
May 30, 2019
Technology
54
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
9 ways to test your spaghetti code
From Nordic Testing Days 2019
Mads Opheim
May 30, 2019
More Decks by Mads Opheim
See All by Mads Opheim
Modern Java App Development in the Cloud
madsopheim
0
62
IoT Powered by MicroProfile - JFuture
madsopheim
0
630
IoT Powered by MicroProfile - MakeIT
madsopheim
0
49
IoT powered by MicroProfile
madsopheim
0
54
9 ways to test your spaghetti code
madsopheim
0
150
Domain driven design in the real world
madsopheim
0
430
Make your tests tell the story of your domain
madsopheim
0
100
IoT powered by MicroProfile
madsopheim
0
61
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
madsopheim
0
76
Other Decks in Technology
See All in Technology
2026-09-04 SRE Tech Talk #15 怠惰なTerraform / Lazy Terraform
masasuzu
0
230
2026/09/10 Spring_Bootから_Jakarta_EE_MicroProfileへの移行
megascus
0
270
AI時代だからこそ、スケールしないことをやろう
yutashigemura
1
120
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
1
220
Snowflakeで実現する全社横断の顧客の声(VOC)分析・活用基盤@Snowflake World Tour Tokyo 2026
yuto16
0
120
20260912_スクフェス三河
kgnkhkr
0
120
2026-09-11 【Snowflake World Tour Tokyo 2026】Snowflakeを起点に、AI Agentが自律稼働し続ける未来へ / Driving AI Agents with Snowflake
civitaspo
0
240
推論の観測、できていますか? 〜 Google Cloud Gemini Enterprise Agent Platformで 3つの Gemini モデルを実測して踏んだ、評価の罠 〜
shukob
PRO
0
180
AIで仕事のやり方を変える
matsu7874
3
1k
多層防御と最⼩権限で実現する、安全なAIエージェント設計パターン
lycorptech_jp
PRO
1
240
目の前の楽しいが人生を変える - コミュニティの螺旋の歩き方と楽しむコツ / change your life
soudai
PRO
3
210
『止めない』を設計する — 制約の中で、事業の根幹を支える判断
hiroyaterui
0
240
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
23k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
490
Automating Front-end Workflow
addyosmani
1369
210k
Optimising Largest Contentful Paint
csswizardry
37
3.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
480
Navigating Weather and Climate Data
rabernat
0
510
Prompt Engineering for Job Search
mfonobong
0
450
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
ラッコキーワード サービス紹介資料
rakko
1
4.8M
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