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
41
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
53
IoT Powered by MicroProfile - JFuture
madsopheim
0
580
IoT Powered by MicroProfile - MakeIT
madsopheim
0
30
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
390
Make your tests tell the story of your domain
madsopheim
0
93
IoT powered by MicroProfile
madsopheim
0
51
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
madsopheim
0
64
Other Decks in Technology
See All in Technology
1万人を変え日本を変える!!多層構造型ふりかえりの大規模組織変革 / 20260108 Kazuki Mori
shift_evolve
PRO
5
850
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
330
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
60k
田舎で20年スクラム(後編):一個人が企業で長期戦アジャイルに挑む意味
chinmo
1
1.1k
Redshift認可、アップデートでどう変わった?
handy
1
130
モノタロウ x クリエーションラインで実現する チームトポロジーにおける プラットフォームチーム・ ストリームアラインドチームの 効果的なコラボレーション
creationline
0
470
善意の活動は、なぜ続かなくなるのか ーふりかえりが"構造を変える判断"になった半年間ー
matsukurou
0
290
CQRS/ESになぜアクターモデルが必要なのか
j5ik2o
0
650
Java 25に至る道
skrb
3
160
ソフトウェアエンジニアとAIエンジニアの役割分担についてのある事例
kworkdev
PRO
1
370
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
2
700
旬のブリと旬の技術で楽しむ AI エージェント設計開発レシピ
chack411
1
110
Featured
See All Featured
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Tell your own story through comics
letsgokoyo
0
770
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Git: the NoSQL Database
bkeepers
PRO
432
66k
sira's awesome portfolio website redesign presentation
elsirapls
0
110
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
110
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
44
The browser strikes back
jonoalderson
0
290
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
40
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
65
35k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
200
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