Nowadays micro-services and distributed systems are trending topic in software development. It seem like if you are doing the micro-services way then you are in the right path or at least in the modern path. In my opinion is more about:
- Know well enough the responsibilities of each part of you system
- Keep good balance of coupling and cohesion
- As consequence be able to Delete Code
Because when you have those then you can go and delete part ( or complete) of a service because: is not need anymore, want to kill some technical debt or even for the fun of recreate it from scratch with different approaches. At the end you are going to have the same system from business perspective but with less code to read, less code to test and less code to cause error. If something is not need or not used just delete it! Keep in mind that is even better if you delete code and you not need to change your tests.
I finish with some phrases of Greg Young:
Unit tests only show that the tests passed, they don’t show lack of bugs.
The definition of a refactor is: I either change my tests or my code and I only change one out of the two.
Technical debt is not a concept business people understand.
If you can rewrite a piece of code in a week, you can understand it in a week.
The one big secret to great consulting: Never build big programs.
The difference between great code and sucky code is the size of the programs.
Don’t try to plan for future changes. Focus on the ability to completely rewrite everything from scratch when that change actually occurs
Make the decision at the last responsible moment.