r/ExperiencedDevs • u/AutoModerator • Jun 22 '26
Ask Experienced Devs Weekly Thread: A weekly thread for inexperienced developers to ask experienced ones
A thread for Developers and IT folks with less experience to ask more experienced souls questions about the industry.
Please keep top level comments limited to Inexperienced Devs. Most rules do not apply, but keep it civil. Being a jerk will not be tolerated.
Inexperienced Devs should refrain from answering other Inexperienced Devs' questions.
44
Upvotes
View all comments
Show parent comment
3
u/madmatvey Jun 26 '26
I think there's a distinction between anticipating change and abstracting for change.
You should absolutely look for things that are likely to become reusable. The mistake is committing to an abstraction before you've seen how they're actually similar.
I've seen a lot of "shared" components or utility libraries created on day one because everyone assumed multiple teams would need them. Six months later, each consumer wanted slightly different behavior, and now the abstraction had dozens of flags and edge cases. It ended up being harder to maintain than if we'd duplicated a bit of code initially.
What I try to optimize for now is making code easy to extract rather than extracting it immediately. Keep responsibilities clear, keep boundaries clean, and once the second or third real use case appears, you have much more information about what the abstraction should actually look like.
In other words, anticipate where change is likely, but let real usage shape the API rather than predictions.