If you have a lot of duplicated code that is prone to often change together, then you will benefit from extracting a common abstraction. As you can see there are a lot of conditions:
- Lots of duplicates
- The change is often. Not once a year
- They change together in one direction. What I often see is that features start similar and then evolve into different directions, and it becomes increasingly expensive to support multiple use cases in one abstraction. What was, in the beginning, a duplicate is now 2 different things. The trick is you do not know the future from the start, it’s a gamble investment to extract abstractions early

Check my article. Folks from Cambridge introduced layers upon layers with single implementations. This is tons of work for nothing. And they are not alone, I was like that too.


Freelancer (Upwork Top Rated Plus). Full-stack Azure cloud developer. JavaScript and TypeScript connoisseur.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store