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
Mads Opheim
November 23, 2018
72
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
61
IoT Powered by MicroProfile - JFuture
madsopheim
0
610
IoT Powered by MicroProfile - MakeIT
madsopheim
0
43
9 ways to test your spaghetti code
madsopheim
0
52
IoT powered by MicroProfile
madsopheim
0
48
9 ways to test your spaghetti code
madsopheim
0
140
Domain driven design in the real world
madsopheim
0
410
Make your tests tell the story of your domain
madsopheim
0
99
IoT powered by MicroProfile
madsopheim
0
59
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.1k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
390
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
310
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
250
We Are The Robots
honzajavorek
0
250
YesSQL, Process and Tooling at Scale
rocio
174
15k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
For a Future-Friendly Web
brad_frost
183
10k
Building the Perfect Custom Keyboard
takai
2
790
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
430
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
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]