YAGNI vs Planning Ahead
YAGNI is a well-known acronym in software engineering. It stands for: "You Ain't Gonna Need It!"
It cautions against overbuilding and overengineering something for an anticipated future that may never arrive. The most concrete example: Your app does not need to be able to handle millions of concurrent users until it turns into the next TikTok, so don't worry about all the crazy complex engineering that would let your app handle millions of users. If you are on the path to becoming the next TikTok, you'll find out soon enough, and then you'll have ample time to ramp up the engineering.
Yet on the other hand, there is value in planning ahead. It's so easy to maneuver yourself into a dead end or suffer unnecessary delays from overlooking simple preventive steps. Deferring some decisions until the need arises is fine. Hitting roadblocks due to failing to anticipate expectations is poor judgment. A concrete example here: If you want to build software for large enterprises, you need to sort out your security certifications, and you don't want to close your eyes to that fact until the moment a potential client walks away over your lack of SOC2 compliance.
So, how to resolve this? When do we plan ahead, and when is YAGNI spot on?
Here's a simple reality check I picked up from a decluttering tip. Specifically, what to do with all those items that you keep around "because you might need them one day." The tip asks to distinguish between two different scenarios:
Scenario 1: If life goes according to plan, I will need this in the foreseeable future. Think winter clothes for your kid that are just a bit too big. You'll need them next year.
Scenario 2: There's a distant dream, a hypothetical scenario, in which I might need this. Think of supplies for a hobby you'd like your kid to pick up one day.
For scenario-1 items, you don't need them right now, but you need them soon enough that actively planning for them makes good sense. For scenario-2 items, YAGNI applies.
In the end, it's about making smart tradeoffs that preserve your optionality, and that means having a bias toward things you need right now, followed by things you will most definitely need soon and not chasing things you probably won't need for a very long time.
