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_-_Devoxx_Ukr...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Mads Opheim
November 23, 2018
65
0
Share
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
Mads Opheim
November 23, 2018
More Decks by Mads Opheim
See All by Mads Opheim
Modern Java App Development in the Cloud
madsopheim
0
59
IoT Powered by MicroProfile - JFuture
madsopheim
0
600
IoT Powered by MicroProfile - MakeIT
madsopheim
0
38
9 ways to test your spaghetti code
madsopheim
0
49
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
400
Make your tests tell the story of your domain
madsopheim
0
95
IoT powered by MicroProfile
madsopheim
0
55
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
490
How GitHub (no longer) Works
holman
316
150k
Tell your own story through comics
letsgokoyo
1
890
Unsuck your backbone
ammeep
672
58k
From π to Pie charts
rasagy
0
160
Joys of Absence: A Defence of Solitary Play
codingconduct
1
340
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
760
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
96
Mobile First: as difficult as doing things right
swwweet
225
10k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
190
We Are The Robots
honzajavorek
0
210
Transcript
Devoxx Ukraine 9 ways to test your spaghetti code Mads
Opheim @MadsOpheim
Goal of this talk: You’ll be inspired and enabled to
test your legacy code 2
What is spaghetti code? 3
Precondition: You are creative The computer is not 4
1. Extract interface 5
6
7 2. Set your dependencies
8
Singletons 9
3. Package-protect problematic parts 10
11
4. Consider removing final 12
Well-designed code is testable code 13
14 5. Help your team
6. Run your tests - and care 15
7. Feature toggles 16
8. One class != one test class 17
9. Test-driven development 18
Test-driven spaghetti 19
Give me more @lisacrispin, @lisihocke, @techgirl1908... 20
Key takeaways 21 1. Good code design improves testability 2.
Short-term sacrifices are ok 3. Write tests for you legacy code - you can do it!
спасибі! 22 @MadsOpheim
[email protected]