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
56
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
39
IoT Powered by MicroProfile - JFuture
madsopheim
0
490
IoT Powered by MicroProfile - MakeIT
madsopheim
0
22
9 ways to test your spaghetti code
madsopheim
0
34
IoT powered by MicroProfile
madsopheim
0
27
9 ways to test your spaghetti code
madsopheim
0
120
Domain driven design in the real world
madsopheim
0
280
Make your tests tell the story of your domain
madsopheim
0
83
IoT powered by MicroProfile
madsopheim
0
39
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
What's in a price? How to price your products and services
michaelherold
243
12k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Into the Great Unknown - MozCon
thekraken
32
1.5k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Building an army of robots
kneath
302
43k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Art, The Web, and Tiny UX
lynnandtonic
297
20k
The Pragmatic Product Professional
lauravandoore
31
6.3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
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]