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
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
59k
産業的変化も組織的変化も乗り越えられるチームへの成長 〜チームの変化から見出す明るい未来〜
kakehashi
PRO
1
320
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.9k
CQRS/ESになぜアクターモデルが必要なのか
j5ik2o
0
630
小さく、早く、可能性を多産する。生成AIプロジェクト / prAIrie-dog
visional_engineering_and_design
0
330
Next.js 16の新機能 Cache Components について
sutetotanuki
0
210
2025年の医用画像AI/AI×medical_imaging_in_2025_generated_by_AI
tdys13
0
310
技術選定、下から見るか?横から見るか?
masakiokuda
0
180
[PR] はじめてのデジタルアイデンティティという本を書きました
ritou
0
770
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
ソフトウェアエンジニアとAIエンジニアの役割分担についてのある事例
kworkdev
PRO
1
370
わが10年の叡智をぶつけたカオスなクラウドインフラが、なくなるということ。
sogaoh
PRO
1
270
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
22k
Paper Plane
katiecoart
PRO
0
45k
Context Engineering - Making Every Token Count
addyosmani
9
590
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
220
The Limits of Empathy - UXLibs8
cassininazir
1
200
Darren the Foodie - Storyboard
khoart
PRO
1
2.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
Odyssey Design
rkendrick25
PRO
0
450
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
270
The Cult of Friendly URLs
andyhume
79
6.7k
Crafting Experiences
bethany
0
25
Heart Work Chapter 1 - Part 1
lfama
PRO
4
35k
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