4
insy
4y

I go to add a method call in a business logic class that's used exclusively in a particular service, and get blocked in the PR by some other guy-

Other Guy: refactor this into the shared framework referenced by all our microservices

Me: it is only and would only be used in this service

OG: what about the other business logic class in this service?

Me: it's not used there, and if it does end up used there then we can refactor it into a class that they both reference then

OG: I need to know when the abstraction of this function will be done. is it going to be delivered next sprint?

Me: YAGNI - better to avoid doing extra work when we don't know if we'll even need it

OG: tbh you can still abstract it with some generics and lambda magic, but im not gonna enforce that

Me: premature abstraction is the root of all evil (tongueout)

OG: not really, its the root of not having a million miles of tech debt in 2 years

I just can't win for losing with the anti-YAGNI yogi.

Comments
  • 3
    Shared code in microservices should usually only include generic business logic that will be used in many places.

    The point of microservices is isolation to avoid code dependencies and inter service code dependencies (among other things) and if you centralized all logic, whats the point of isolating usage?
Add Comment