The Problem You're building a NotificationService for your app. First requirement is to send notifications over email. Simple enough. You write an EmailSender class and inside NotificationService, you
onkeshgupta.hashnode.dev8 min readAdam Lewis
Product Engineer/Architect navigating the AI revolution
Good explanation, and the section on not adding an interface for everything is the one most write-ups leave out. I'd add that this matters more now that agents write a lot of first drafts. Left to themselves they construct the concrete sender inside the service every time, because that's the shape most of the training data has, and they will also add an interface for a class that will only ever have one implementation if you tell them to 'apply SOLID'. Both need a rule in the repo. The agent side of DIP, if useful: prickles.org/tenet/dependency-inversion-principle…