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
48
IoT powered by MicroProfile
madsopheim
0
52
9 ways to test your spaghetti code
madsopheim
0
150
Domain driven design in the real world
madsopheim
0
430
Make your tests tell the story of your domain
madsopheim
0
100
IoT powered by MicroProfile
madsopheim
0
61
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
madsopheim
0
73
Other Decks in Technology
See All in Technology
AI・HPC開発を支えるGPU環境の新しい選択肢 液冷GPUシステム「AquSys」の取り組み
gpuunite_official
0
190
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
カーネルまで探検して理解するふたつの自動計装
sumiyae
0
110
Head First モブプログラミング / Head First Mobprogramming
takaking22
10
12k
Genie Codeハンズオン応用編
taka_aki
0
140
MulticaとPi Coding Agentで、小規模OSSを30本同時運用した流れ
eiei114
0
140
アクセスキーが漏れた日にやるべきこと- 無効化の先にある本当の対応
kazzpapa3
0
140
Flutter × BLE Centralを自前Pluginで実装する設計パターン - MethodChannel / EventChannelで作る双方向ブリッジの実践 / Building Custom Flutter BLE Central Plugins: Bidirectional Bridging with Method & Event Channels
bitkey
PRO
0
210
平文パスワードはログに“残り” ── 肝心の侵入は“痕跡すら残らない”
kuroneko13
0
120
20260817_生成AIの動向と中学校・高等学校での活用を考える_v1.00_公開用
doradora09
PRO
0
180
RelayerというPHPのフレームワークを作った
polidog
PRO
0
110
AI画像認識を活用したゲーム内決済処理検証の自動化
gree_tech
PRO
0
110
Featured
See All Featured
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
420
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
We Are The Robots
honzajavorek
0
300
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Are puppies a ranking factor?
jonoalderson
2
3.8k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
Google's AI Overviews - The New Search
badams
0
1.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
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