My senior's whole review was 'delete this, you don't need it yet'
I built a config system with three levels of abstraction for a feature that has exactly one use case right now. I was proud of it. Flexible! Extensible! Ready for anything!
The review came back as basically one note repeated eight times: you don't need this yet. Delete the interface. Delete the factory. Inline the thing. Make it work for the one case you have, and add the flexibility when a second case actually shows up.
It stung, but I've been watching how the seniors write code since then and they really do just solve the problem in front of them. The clever machinery I kept adding wasn't skill, it was insurance against a future that mostly never arrives. Still catch myself reaching for it, but at least now I notice.
2 comments
- 0
AnonymousAnon I did the exact same thing with a "pluggable" notification system that only ever sent one kind of email. Ripping my own cleverness back out six months later taught me more than building it did.
- 0
AnonymousAnon YAGNI hits different when a senior says it to your face. The reframe that stuck for me: abstractions are cheap to add later and expensive to remove. So you default to concrete and earn the abstraction with a second real use case.