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
68
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
60
IoT Powered by MicroProfile - JFuture
madsopheim
0
610
IoT Powered by MicroProfile - MakeIT
madsopheim
0
42
9 ways to test your spaghetti code
madsopheim
0
52
IoT powered by MicroProfile
madsopheim
0
42
9 ways to test your spaghetti code
madsopheim
0
130
Domain driven design in the real world
madsopheim
0
410
Make your tests tell the story of your domain
madsopheim
0
97
IoT powered by MicroProfile
madsopheim
0
57
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
290
SEO for Brand Visibility & Recognition
aleyda
0
4.5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
410
Six Lessons from altMBA
skipperchong
29
4.2k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
170
My Coaching Mixtape
mlcsv
0
120
Git: the NoSQL Database
bkeepers
PRO
432
67k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
510
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
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]