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
34
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
39
IoT Powered by MicroProfile - JFuture
madsopheim
0
490
IoT Powered by MicroProfile - MakeIT
madsopheim
0
22
IoT powered by MicroProfile
madsopheim
0
27
9 ways to test your spaghetti code
madsopheim
0
120
Domain driven design in the real world
madsopheim
0
280
Make your tests tell the story of your domain
madsopheim
0
83
IoT powered by MicroProfile
madsopheim
0
39
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
madsopheim
0
56
Other Decks in Technology
See All in Technology
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
2
230
DynamoDB でスロットリングが発生したとき_大盛りver/when_throttling_occurs_in_dynamodb_long
emiki
1
440
OTelCol_TailSampling_and_SpanMetrics
gumamon
1
220
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
130
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
日経電子版のStoreKit2フルリニューアル
shimastripe
1
150
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
190
組織成長を加速させるオンボーディングの取り組み
sudoakiy
2
220
SSMRunbook作成の勘所_20241120
koichiotomo
3
160
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
個人でもIAM Identity Centerを使おう!(アクセス管理編)
ryder472
4
240
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Documentation Writing (for coders)
carmenintech
65
4.4k
The Cult of Friendly URLs
andyhume
78
6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Typedesign – Prime Four
hannesfritz
40
2.4k
We Have a Design System, Now What?
morganepeng
50
7.2k
Become a Pro
speakerdeck
PRO
25
5k
Agile that works and the tools we love
rasmusluckow
327
21k
A designer walks into a library…
pauljervisheath
204
24k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
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