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
36
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
47
IoT Powered by MicroProfile - JFuture
madsopheim
0
560
IoT Powered by MicroProfile - MakeIT
madsopheim
0
25
IoT powered by MicroProfile
madsopheim
0
30
9 ways to test your spaghetti code
madsopheim
0
130
Domain driven design in the real world
madsopheim
0
370
Make your tests tell the story of your domain
madsopheim
0
87
IoT powered by MicroProfile
madsopheim
0
45
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
madsopheim
0
60
Other Decks in Technology
See All in Technology
AI時代の大規模データ活用とセキュリティ戦略
ken5scal
1
270
2025新卒研修・Webアプリケーションセキュリティ #弁護士ドットコム
bengo4com
3
10k
はじめての転職講座/The Guide of First Career Change
kwappa
5
4.5k
[CV勉強会@関東 CVPR2025 読み会] MegaSaM: Accurate, Fast, and Robust Structure and Motion from Casual Dynamic Videos (Li+, CVPR2025)
abemii
0
180
株式会社ARAV 採用案内
maqui
0
140
いかにして命令の入れ替わりについて心配するのをやめ、メモリモデルを愛するようになったか(改)
nullpo_head
7
2.8k
第64回コンピュータビジョン勉強会@関東(後編)
tsukamotokenji
0
210
20250818_KGX・One Hokkaidoコラボイベント
tohgeyukihiro
0
130
React Server ComponentsでAPI不要の開発体験
polidog
PRO
1
360
ECS モニタリング手法大整理
yendoooo
1
110
Amazon S3 Vectorsは大規模ベクトル検索を低コスト化するサーバーレスなベクトルデータベースだ #jawsugsaga / S3 Vectors As A Serverless Vector Database
quiver
2
1.1k
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
6.4k
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
How to Think Like a Performance Engineer
csswizardry
25
1.8k
The Language of Interfaces
destraynor
160
25k
We Have a Design System, Now What?
morganepeng
53
7.7k
Balancing Empowerment & Direction
lara
2
580
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
KATA
mclloyd
32
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Bash Introduction
62gerente
614
210k
Making the Leap to Tech Lead
cromwellryan
134
9.5k
Art, The Web, and Tiny UX
lynnandtonic
302
21k
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