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 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). 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. I spend a lot of time on software architecture. Since 2008, I've been as a developer for different companies and organizations and I've been focusing on Microsoft ecosystem all the time. During the past years, Read More

Post Tags
Pending Blog Posts
using Elmah in asp.net MVC4
Using FluentSecurity in MVC
Strategic design
Factory Pattern
time out pattern in ajax
Redis as a cache server
How to use PagedList In asp.net MVC
Multiple submit buttons in asp.net MVC
Domain driven design VS model driven architecture
What's the DDD-lite?
comments powered by Disqus