Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
9 ways to test your spaghetti code
Search
Mads Opheim
May 30, 2019
Technology
57
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
Transcript
31 slides
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
More Decks by Mads Opheim
See All by Mads Opheim
Modern Java App Development in the Cloud
madsopheim
0
65
IoT Powered by MicroProfile - JFuture
madsopheim
0
640
IoT Powered by MicroProfile - MakeIT
madsopheim
0
54
IoT powered by MicroProfile
madsopheim
0
57
9 ways to test your spaghetti code
madsopheim
0
160
Domain driven design in the real world
madsopheim
0
440
Make your tests tell the story of your domain
madsopheim
0
110
IoT powered by MicroProfile
madsopheim
0
65
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
madsopheim
0
80
Other Decks in Technology
See All in Technology
信頼性を犠牲にせず、PR マージからデプロイまで人の介入を完全にゼロにするまでの道のり
knwoop
4
2.1k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
17
120k
「正しいデータ」の定義をAI エージェントとつくるGoogleADKによるデータ品質定義の実践
takaha4k
0
120
Amazon EFS のマルウェアスキャンをClamAV で自前実装したら苦労した話
mtmtfactory01
0
110
Kansai WordPress Meetup@大阪『ブロックテーマを作る上で知っておくべきこと
torounit
0
310
社内アプリ基盤「Quartz」による、 非エンジニアとAIに本番デプロイを 任せても壊れないプラットフォームの設計
staka121
PRO
1
230
kubellの最新データ分析環境
kubell_hr
2
260
AIエージェントのアーキテクチャ設計
nsatoh
0
490
[関西Kaggler会 20261113] 続・コミュニティコンペのススメ
nejumi
0
200
文書画像からの情報抽出を行うエージェントを、軌跡の正解データ無しで作れるか
sansantech
PRO
2
230
専門家に使ってもらうAIプロダクトをつくる - 病院の医事課向けDPCコーディング支援システムの設計と評価
hagino3000
4
1k
AWS Well-Arhitected Frameworkセキュリティの柱 について
miu_crescent
PRO
2
230
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
650
Crafting Experiences
bethany
1
450
Scaling GitHub
holman
464
140k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
780
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
850
Color Theory Basics | Prateek | Gurzu
gurzu
1
530
BBQ
matthewcrist
90
10k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
360
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
480
Heart Work Chapter 1 - Part 1
lfama
PRO
11
37k
Optimising Largest Contentful Paint
csswizardry
37
4k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
880