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
24
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
32
IoT Powered by MicroProfile - JFuture
madsopheim
0
450
IoT Powered by MicroProfile - MakeIT
madsopheim
0
18
IoT powered by MicroProfile
madsopheim
0
23
9 ways to test your spaghetti code
madsopheim
0
110
Domain driven design in the real world
madsopheim
0
180
Make your tests tell the story of your domain
madsopheim
0
71
IoT powered by MicroProfile
madsopheim
0
38
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
madsopheim
0
50
Other Decks in Technology
See All in Technology
統計的学習理論読み Chapter 2
kmatsui
1
230
中央集権体制からDataOpsへの転換 / centralized-to-dataops-transformation
pei0804
7
1.5k
暗黙知を集積するプラットフォーム : 「健常者エミュレータ事例集」の取り組み
sora32127
1
160
Ask-LLM論文紹介: How to Train Data-Efficient LLMs
s_ota
0
110
LLMプロダクト事業の立ち上げにおける挑戦
layerx
PRO
7
1.4k
単回帰分析について数式を追いながら実装してみた
kentaitakura
0
500
今さら聞けない!? AWSの生成AIサービス Amazon Bedrock入門!
minorun365
PRO
11
2.5k
Challenges - Open Farming Hackdays 2024
loleg
0
560
やっていきテスト
k6s4i53rx
0
160
家族アルバム みてねで直面してきた技術的負債 / MIXI KAG 2024
isaoshimizu
17
7.7k
技育祭2024春 LT Finatextホールディングス
kevinrobot34
1
160
KubeCon EU: Unlocking new Platform Experiences with Open Interfaces
salaboy
1
370
Featured
See All Featured
Designing for Performance
lara
601
67k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
101
6.6k
Fontdeck: Realign not Redesign
paulrobertlloyd
75
4.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
10
4.5k
Atom: Resistance is Futile
akmur
258
25k
jQuery: Nuts, Bolts and Bling
dougneiner
57
7.1k
Robots, Beer and Maslow
schacon
PRO
154
7.9k
How To Stay Up To Date on Web Technology
chriscoyier
781
250k
Building Flexible Design Systems
yeseniaperezcruz
317
37k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
657
120k
Designing for humans not robots
tammielis
247
25k
Producing Creativity
orderedlist
PRO
335
39k
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