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
37
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
50
IoT Powered by MicroProfile - JFuture
madsopheim
0
570
IoT Powered by MicroProfile - MakeIT
madsopheim
0
27
IoT powered by MicroProfile
madsopheim
0
35
9 ways to test your spaghetti code
madsopheim
0
130
Domain driven design in the real world
madsopheim
0
380
Make your tests tell the story of your domain
madsopheim
0
92
IoT powered by MicroProfile
madsopheim
0
51
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
madsopheim
0
61
Other Decks in Technology
See All in Technology
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
15k
リアーキテクティングのその先へ 〜品質と開発生産性の壁を越えるプラットフォーム戦略〜 / architecture-con2025
visional_engineering_and_design
0
7.8k
国産クラウドを支える設計とチームの変遷 “技術・組織・ミッション”
kazeburo
5
9.6k
.NET 10のASP. NET Core注目の新機能
tomokusaba
0
140
新しい風。SolidFlutterで実現するシンプルな状態管理
zozotech
PRO
0
140
信頼性が求められる業務のAIAgentのアーキテクチャ設計の勘所と課題
miyatakoji
0
180
『星の世界の地図の話: Google Sky MapをAI Agentでよみがえらせる』 - Google Developers DevFest Tokyo 2025
taniiicom
0
410
"なるべくスケジューリングしない" を実現する "PreferNoSchedule" taint
superbrothers
0
110
その意思決定、まだ続けるんですか? ~痛みを超えて未来を作る、AI時代の撤退とピボットの技術~
applism118
42
24k
Digital omtanke på Internetdagarna 2025
axbom
PRO
0
130
IPv6-mostly field report from RubyKaigi 2026
sorah
0
210
Eight Engineering Unit 紹介資料
sansan33
PRO
0
5.6k
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Practical Orchestrator
shlominoach
190
11k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
Six Lessons from altMBA
skipperchong
29
4.1k
Balancing Empowerment & Direction
lara
5
760
What's in a price? How to price your products and services
michaelherold
246
12k
Writing Fast Ruby
sferik
630
62k
Site-Speed That Sticks
csswizardry
13
970
Done Done
chrislema
186
16k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
YesSQL, Process and Tooling at Scale
rocio
174
15k
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