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
53
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
620
IoT Powered by MicroProfile - MakeIT
madsopheim
0
45
IoT powered by MicroProfile
madsopheim
0
49
9 ways to test your spaghetti code
madsopheim
0
140
Domain driven design in the real world
madsopheim
0
420
Make your tests tell the story of your domain
madsopheim
0
100
IoT powered by MicroProfile
madsopheim
0
59
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
madsopheim
0
73
Other Decks in Technology
See All in Technology
セキュリティ研修【MIXI 26新卒技術研修】
mixi_engineers
PRO
32
27k
脱Jenkins、インターン生が挑んだCIツールGitHubActions移行
mixi_engineers
PRO
1
300
実践が先生だった— 新卒サーバーエンジニア1年目のリアル
mixi_engineers
PRO
0
230
LangfuseによるLLMOps基盤の構築と活用事例
zozotech
PRO
1
220
AIがAPIを書く時代に、私たちは何を設計すべきか
nagix
0
200
Amazon Bedrock Managed Knowledge BaseDive Deep
ren8k
0
320
新しい SLO が良い感じにハマっている話
z63d
4
1.9k
システム監視を 「システムを監視するだけ」で 終わらせないために
seiud
0
160
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
53k
もう一度考える SRE チームの作り方・育て方 / Rethinking SRE #1: Building and Growing SRE Teams
rrreeeyyy
4
640
検索技術知識0のエンジニアが広告検索システムを内製化して運用するまで
lycorptech_jp
PRO
0
180
数値で見る Microsoft MVP 〜Spec Kit と GitHub Copilot Agent で作るデータ可視化ダッシュボード〜
yutakaosada
0
180
Featured
See All Featured
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
400
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Six Lessons from altMBA
skipperchong
29
4.4k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
41k
Context Engineering - Making Every Token Count
addyosmani
9
1k
Google's AI Overviews - The New Search
badams
0
1.1k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.7k
Code Review Best Practice
trishagee
74
20k
For a Future-Friendly Web
brad_frost
183
10k
Making the Leap to Tech Lead
cromwellryan
135
10k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
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