Just start with copy and paste
I recently came across this post by Sandi Metz again.
I’ve been thinking about the consequences of the “wrong abstraction.” My RailsConf 2014 “all the little things” talk included a section where I asserted: duplication is far cheaper than the wrong abstraction And in the summary, I went on to advise: prefer duplication over the wrong abstraction
We re-architected our application at Flex last year into microservices.
Teams are responsible for deploying their services onto the Kubernetes platform that my team provides. Most engineers were new to Kubernetes and needed help setting up their deployments.
We started by copying and pasting the manifests I wrote between each service.
When new services got spun up, copying, pasting, and replacing all the correct pieces became more error-prone.
At this point, I provided them with a copier template to use.
Copier is more structured copy and paste.
I’ve worked at places where tooling was built too early. The abstractions weren’t perfect, and people didn’t use them anyway.
Flex is about 30 services now. We’re still copying and pasting and will probably bump into its limits soon.
When it’s time to start abstracting, the lessons learned from copying and pasting will help us build a far better solution than if we started down this path.