In Soap/Micro service architecture I have an empirical rule:
0) Duplication within the same codebase is bad unless it serves purpose of better readability.
1) Duplicating the same utility/stateless code twice is not a crime in separate projects.
2) Making some piece of code to be generic to fit only 2 usages in different micro services/projects is over engineering and usually a bad idea
3) Duplicating 3 times (across diff projects) is still not bad but probably It's time to reconcile why this is happening and mark it as a refactoring candidate.
Dev Rel & Live Coding Streamer. Obsessed with using code, inclusion, & design thinking to bring big ideas to life and tell digital stories worth sharing.
Thanks for sharing, that makes a lot of sense! I'm going to add this to my jr dev notebook. I'm just now coming to terms that duplication isn't always the bad guy as I was taught in school.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In Soap/Micro service architecture I have an empirical rule:
0) Duplication within the same codebase is bad unless it serves purpose of better readability.
1) Duplicating the same utility/stateless code twice is not a crime in separate projects.
2) Making some piece of code to be generic to fit only 2 usages in different micro services/projects is over engineering and usually a bad idea
3) Duplicating 3 times (across diff projects) is still not bad but probably It's time to reconcile why this is happening and mark it as a refactoring candidate.
Thanks for sharing, that makes a lot of sense! I'm going to add this to my jr dev notebook. I'm just now coming to terms that duplication isn't always the bad guy as I was taught in school.