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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Mads Opheim
May 30, 2019
Technology
0
47
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
54
IoT Powered by MicroProfile - JFuture
madsopheim
0
600
IoT Powered by MicroProfile - MakeIT
madsopheim
0
36
IoT powered by MicroProfile
madsopheim
0
37
9 ways to test your spaghetti code
madsopheim
0
130
Domain driven design in the real world
madsopheim
0
400
Make your tests tell the story of your domain
madsopheim
0
94
IoT powered by MicroProfile
madsopheim
0
51
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
madsopheim
0
65
Other Decks in Technology
See All in Technology
「ヒットする」+「近い」を同時にかなえるスマートサジェストの作り方.pdf
nakasho
0
110
Windows ネットワークを再確認する
murachiakira
PRO
0
260
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
7
7.1k
オンプレとGoogle Cloudを安全に繋ぐための、セキュア通信の勘所
waiwai2111
3
1.1k
ブラックボックス観測に基づくAI支援のプロトコルのリバースエンジニアリングと再現~AIを用いたリバースエンジニアリング~ @ SECCON 14 電脳会議 / Reverse Engineering and Reproduction of an AI-Assisted Protocol Based on Black-Box Observation @ SECCON 14 DENNO-KAIGI
chibiegg
0
140
Data Hubグループ 紹介資料
sansan33
PRO
0
2.8k
大規模サービスにおける レガシーコードからReactへの移行
magicpod
1
120
技術的負債の泥沼から組織を救う3つの転換点
nwiizo
5
1.2k
どこで打鍵するのが良い? IaCの実行基盤選定について
nrinetcom
PRO
2
160
Introduction to Bill One Development Engineer
sansan33
PRO
0
380
クラウド時代における一時権限取得
krrrr38
1
150
OSSで構築するIT基盤管理実践事例: NetBox・Snipe-IT・FreeRADIUS+PrivacyIDEA / Practical Case Studies of IT Infrastructure Management Using OSS
nttcom
0
190
Featured
See All Featured
Prompt Engineering for Job Search
mfonobong
0
180
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
230
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
220
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.1k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
190
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Making Projects Easy
brettharned
120
6.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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