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
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
53
IoT Powered by MicroProfile - JFuture
madsopheim
0
590
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
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
65
Other Decks in Technology
See All in Technology
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.6k
1,000 にも届く AWS Organizations 組織のポリシー運用をちゃんとしたい、という話
kazzpapa3
0
150
仕様書駆動AI開発の実践: Issue→Skill→PRテンプレで 再現性を作る
knishioka
2
680
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
210
Frontier Agents (Kiro autonomous agent / AWS Security Agent / AWS DevOps Agent) の紹介
msysh
3
180
Claude_CodeでSEOを最適化する_AI_Ops_Community_Vol.2__マーケティングx_AIはここまで進化した.pdf
riku_423
2
610
Why Organizations Fail: ノーベル経済学賞「国家はなぜ衰退するのか」から考えるアジャイル組織論
kawaguti
PRO
1
180
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
770
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
540
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
2k
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
840
Featured
See All Featured
Music & Morning Musume
bryan
47
7.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Google's AI Overviews - The New Search
badams
0
910
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.6k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.4k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
440
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
290
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Building Adaptive Systems
keathley
44
2.9k
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