3 ms·
> How hard is it to understand the notion of "building what you need, and not what you don't"? Very hard, because it's in fact a tradeoff. Let's say you are bu
by asgard1024 11y ago
> How hard is it to understand the notion of "building what you need, and not what you don't"?
Very hard, because it's in fact a tradeoff. Let's say you are building a house. Will you have wife and kids in the future? YAGNI says you can always expand your house once you have kids. But do people really build houses that way?
To take more extreme example, first thing you expect from housing is a protection from elements. So according to YAGNI, you should build the roof first, and see if it's good enough for you (and you don't bother, for instance, that you can only stand in the middle of the room). Again, no one really does that with real houses.
The whole art of engineering is to pick the reasonable tradeoffs, and this includes hedging against the risk of future expansion. That's why simple pronouncements as YAGNI are not of much help.
- lmm 11y ago> To take more extreme example, first thing you expect from housing is a protection from elements. So according to YAGNI, you should build the roof first, and see if it's good enough for you (and you don't bother, for instance, that you can only stand in the middle of the room). Again, no one really does that with real houses. Maybe they should. I once stayed in a house with no internal walls. It seemed weird at first, but then I realized I actually quite liked it.
- pbreit 11y agoExtreme examples are not that interesting (to me) since it's far more important to optimize what is not extreme. A better house example is to go ahead and build the 2-4 BR house (like pretty much everyone does) but wait on the pool and jungle gym.
- asgard1024 11y agoThe extreme examples are just to illustrate the tradeoff. Some architectural decisions have to be made in advance, because they are hard to take back. In your example, size of the property (if any) on which your house is standing is such a decision. Good luck building a pool in a 4-bedroom apartment. (Interestingly, you said, "like pretty much everyone does" - isn't that actually a sounder advice than YAGNI?)
- pbreit 11y agoI don't put much stock in extreme examples. Much more useful to review common examples.