As a developer, I always pretend that I know about principles, Rules, methods, KISS, and YAGNI! But in some cases, if you consider my codes you will find out that they are just some best bunch of code for giving an example as introduction dirty code for teaching YAGNI principle!
YAGNI is a principle of extreme programming that says "Never add functionality until deemed necessary". what I mostly make mistake is adding some extra functionality earlier and most of the time they never been used.
Never Add Functionality Early
I think YAGNI is something more than coding correctly. Every aspect of the task should be considered at the first and requirement must be analyzed. It seems that I'm not the only guys who write extra code! Only 10% of that extra stuff will ever get used, so you are wasting 90% of your time (I don’t remember where I've read this). The code should be ready for unexpected changes and open for modification but it DOES NOT mean to guess and implement the future of the product without any consideration, design, …
We Keep this at the forefront of our mind that practicing good architectures could be more vital on duplicating and guessing extra things. We must implement some generic and common operations of the application for once and cross cut it as we don't need to guess what else is required here or not.
So let's try to implement what we really need!