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
0
60
9_ways_to_test_your_spaghetti_code_-_Devoxx_Ukraine.pdf
Mads Opheim
November 23, 2018
Tweet
Share
More Decks by Mads Opheim
See All by Mads Opheim
Modern Java App Development in the Cloud
madsopheim
0
47
IoT Powered by MicroProfile - JFuture
madsopheim
0
560
IoT Powered by MicroProfile - MakeIT
madsopheim
0
25
9 ways to test your spaghetti code
madsopheim
0
36
IoT powered by MicroProfile
madsopheim
0
30
9 ways to test your spaghetti code
madsopheim
0
130
Domain driven design in the real world
madsopheim
0
370
Make your tests tell the story of your domain
madsopheim
0
87
IoT powered by MicroProfile
madsopheim
0
45
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
A Modern Web Designer's Workflow
chriscoyier
695
190k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
110
20k
How STYLIGHT went responsive
nonsquared
100
5.7k
Writing Fast Ruby
sferik
628
62k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Designing Experiences People Love
moore
142
24k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
What's in a price? How to price your products and services
michaelherold
246
12k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
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]