The only way to survive in a codebase is by refactoring continuously. We know that since the Extreme Programming days. But what stops us from doing so today? In this talk, Victor summarizes what he learned discussing Clean Code and Refactoring with hundreds of teams throughout the world. You'll find ideas to tackle a broad spectrum of factors: technical, cultural, psychological, emotional, social, and even political. Using these you might unlock the freedom to refactor for you and your colleagues.
After this roundtrip, the talk briefly overviews several of the most dangerous code smells in the projects today: God Class, Duplicated Code vs Divergent Code, Temporal Coupling, Middle Man, Speculative Generality, Mutable Long-Lived State, Comments, and more. For each of them we’ll discuss a typical workaround, plus several subtleties and variations.
2. Victor Rentea
VictorRentea.ro
Recorded Talks, Blog, Video Courses, ...
Independent Trainer
Founder of
Bucharest Software Craftsmanship Community
Java Champion
❤️ Simple Design, Refactoring, Unit Testing ❤️
3. Technical Training
500 days
(200+ online)
2000 devs
8 years 50+ companies
Reach out
to me:
Hibernate
Spring Func Prog
Java Performance
Reactive Prog
Design Patterns
Pragmatic DDD
Clean Code
Refactoring
Unit Testing
TDD
any
lang
@victorrentea
Intense
More: VictorRentea.ro
Workshops: victorrentea.teachable.com
36. VictorRentea.ro
61
Large Method
God Class
Too Many Parameters
Data Clumps
(String, String, Long) ➔ Address
> 20 lines
> 200 lines
> 4
All numbers are arbitrary. Find your own comfort zone
41. VictorRentea.ro
69
Primitive Obsession
Make concepts explicit
by introducing new small classes
Even if it's a single
String → PhoneNumber
Long → CustomerId → ID type:
@Value
class CustomerId {
Long id;
}
Escape the
49. VictorRentea.ro
blog, best talks, training offer
@VictorRentea
The End
victorrentea.ro/community
Join me:
Stay into
The Light
sourcemaking.com/refactoring
First Half + Ch. 17 Ch.3 Code Smells For rookies Coding Katas
kata-log.rocks/refactoring
cleancoders.com
refactoring.guru
Share your thoughts
The Beginning