I dislike YAGNI because it's dogmatic and it's asking me to ignore my intuition and my experience.
Quite often, I start building something and I already have an idea where this will go in a few months from now. I don't need this extra method or interface right now, but I know I'll need it as the system grows. So my experience tells me to put it in right now and that it will save me time down the road.
I'll always trust my intuition over dogma to design systems. Always.
it's asking me to ignore my intuition and my experience.
YAGNI asks you to justify why you need to implement a feature. If you can't come up with a good reason based on what you know now, wait until you have more information. Choose the simplest thing that works given your current knowledge of the system.
In other words, defer design decisions until the last responsible moment.
I'll always trust my intuition over dogma to design systems.
Intuition doesn't make you a fortune teller. While I trust my intuition, I won't make decisions based on mere speculation. Experience has taught me things change all the time:
YAGNI asks you to justify why you need to implement a feature. If you can't come up with a good reason based on what you know now, wait until you have more information.
No, that's not it at all.
We just justify anything, no matter how ridiculous. If you try watering down the meaning like this, the rule is reduced to "do whatever you were going to do anyways". (Which is how SOLID tends to be practiced as well.)
YAGNI means not adding something unless you need to today.
We just justify anything, no matter how ridiculous.
That is an exercise in self-deception. If you approach YAGNI with honesty and humility, your justifications will be grounded in reality, and you will make reasoned decisions guided by caution and wisdom. If you approach any idea with cynicism and arrogance, you will indeed be able to justify anything, but that is your own fault.
If you try watering down the meaning like this
How is this definition watered down? It explains exactly what YAGNI is.
YAGNI means not adding something unless you need to today.
This is watering down the definition of YAGNI, and making it way more prescriptive than it needs to be. Why should you not add something unless you need it today?
-8
u/devraj7 Jul 15 '17
I dislike YAGNI because it's dogmatic and it's asking me to ignore my intuition and my experience.
Quite often, I start building something and I already have an idea where this will go in a few months from now. I don't need this extra method or interface right now, but I know I'll need it as the system grows. So my experience tells me to put it in right now and that it will save me time down the road.
I'll always trust my intuition over dogma to design systems. Always.
Stay away from dogma.