Ehsan Ghanbari

Experience, DotNet, Solutions

YAGNI, Never Add Functionality Early

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!


About Me

Ehsan Ghanbari

Hi! my name is Ehsan. I'm a developer, passionate technologist, and fan of clean code. I'm interested in enterprise and large-scale applications architecture and design patterns and I'm spending a lot of my time on architecture subject. Since 2008, I've been as a developer for companies and organizations and I've been focusing on Microsoft ecosystem all the time. During the&nb Read More

Post Tags
Pending Blog Posts
Strategic design
Factory Pattern
time out pattern in ajax
Selectors in Jquery
Peridic pattern
How to query over Icollection<> of a type with linq
How to use PagedList In MVC
Domain driven design VS model driven architecture
Using Generic type for type casting in F#
What's the DDD-lite?
comments powered by Disqus