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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
0
440
enechainの内製セルフサービスプラットフォーム
hiyosi
0
120
Redmine 7.0で私が開発した新機能の狙いと背景
vividtone
1
110
データエンジニアの困りごとをDevinと一緒に解消する
10xinc
2
840
作り直せるコードは迅速に 作り直せないDBは慎重に - AI時代のプロダクトエンジニアが「判断の不可逆性」で開発速度を変える話
kinosuke01
0
250
Bet AI Day 2026丨バクラク Autopilot、業務システムの再設計
layerx
PRO
2
1.5k
Nav2、Nav3 ... はたまた自作?〜 作って理解する Nav3 の設計意図 〜 / Nav2, Nav3 ... or Build Your Own? — Understanding Nav3's design intent by building it from scratch
yanzm
0
250
AIエージェントの開発・提供におけるセキュリティリスクの論点と対策
flatt_security
1
590
Guerilla InnerSource in enterprises, during the AI hype
onenashev
PRO
0
150
なぜSRE・セキュリティは評価されないのか?守りの組織を事業成長エンジンに変えた実践
cscengineer
PRO
3
2.3k
はじめてのDatabricks:技術者向けワークショップ / beginner-workshop
databricksjapan
PRO
0
230
DINO-EdgeQuery:Edge-First Polygon Decoding for Building Footprint Extraction from Satellite Imagery
lehupa
0
150
Featured
See All Featured
Facilitating Awesome Meetings
lara
57
7.1k
It's Worth the Effort
3n
188
29k
Are puppies a ranking factor?
jonoalderson
2
3.9k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
45k
The Invisible Side of Design
smashingmag
301
52k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Paper Plane (Part 1)
katiecoart
PRO
1
11k
Leo the Paperboy
mayatellez
8
2.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
290
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