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
47
IoT Powered by MicroProfile - JFuture
madsopheim
0
560
IoT Powered by MicroProfile - MakeIT
madsopheim
0
26
IoT powered by MicroProfile
madsopheim
0
31
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
88
IoT powered by MicroProfile
madsopheim
0
47
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
madsopheim
0
60
Other Decks in Technology
See All in Technology
現場で効くClaude Code ─ 最新動向と企業導入
takaakikakei
1
240
BPaaSにおける人と協働する前提のAIエージェント-AWS登壇資料
kentarofujii
0
130
ZOZOマッチのアーキテクチャと技術構成
zozotech
PRO
3
1.5k
スマートファクトリーの第一歩 〜AWSマネージドサービスで 実現する予知保全と生成AI活用まで
ganota
2
210
実践!カスタムインストラクション&スラッシュコマンド
puku0x
0
370
20250910_障害注入から効率的復旧へ_カオスエンジニアリング_生成AIで考えるAWS障害対応.pdf
sh_fk2
3
240
「何となくテストする」を卒業するためにプロダクトが動く仕組みを理解しよう
kawabeaver
0
390
KotlinConf 2025_イベントレポート
sony
1
130
ハードウェアとソフトウェアをつなぐ全てを内製している企業の E2E テストの作り方 / How to create E2E tests for a company that builds everything connecting hardware and software in-house
bitkey
PRO
1
120
初めてAWSを使うときのセキュリティ覚書〜初心者支部編〜
cmusudakeisuke
1
240
新アイテムをどう使っていくか?みんなであーだこーだ言ってみよう / 20250911-rpi-jam-tokyo
akkiesoft
0
220
データアナリストからアナリティクスエンジニアになった話
hiyokko_data
2
440
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.7k
Typedesign – Prime Four
hannesfritz
42
2.8k
What's in a price? How to price your products and services
michaelherold
246
12k
Automating Front-end Workflow
addyosmani
1370
200k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
51
5.6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
How to train your dragon (web standard)
notwaldorf
96
6.2k
Agile that works and the tools we love
rasmusluckow
330
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