
Code Duplication vs Flexibility

#60 - Software Tradeoffs and How to Make Good Programming Decisions - Tomasz Lelek
Topic 5 of 10
Published Oct 18, 2021 · Clip 15:25–20:09 (4:44)
Tomasz discusses code duplication at the architecture level: shared code between microservices (e.g., authorization, validation) tempts extraction into a common library, but that creates tight coupling and hurts independent evolution and delivery speed. Extracting shared functionality to a new microservice adds latency and deployment overhead. His advice is to wait until components are stable and abstractions settle before extracting, while maintaining good test coverage; some functionality (string manipulation, external connections) can safely be reused early.