YAGNI: Focus on What Counts

414 viewsGeneral DiscussionSkills Development

YAGNI: Focus on What Counts

Spent days developing a feature… only to find that nobody ever used it? That is effort in vain, and that is what YAGNI is meant to stop.

What is YAGNI?
YAGNI is an acronym that can be explained by You Aren’t Gonna Need It. It is easy just not to create features that are not required yet. Concentrate on the current issue, not on the future tomorrow, maybe.

Why Developers Ought to Adhere to YAGNI ?

  • Saving time
  • Make it simpler
  • Keep bugs to a minimum
  • Be flexible

Steps to Apply YAGNI

  1. Keep it simple:  Build the least functionality.
  2. Try to ask yourself:  Do I need this now?
  3. Add complexity later:  This is an addition to the code that must be done when the requirements are a reality.
  4. Revise according to the feedback:  Have real user needs dictate your next move.

Simple Example

Suppose you are developing a messaging application. The first feature you have is to send a text message.

You may imagine, “What about GIFs, stickers, or reactions, desired by users?
YAGNI says: Not today. Build text messaging first. Users request GIFs, and you include them when users do so in reality.
You have saved several weeks of time, which were wasted.

Advantages of YAGNI

  • Quicker growth:  Get down to business.
  • Better code:  Clean and maintenance-free.
  • Greater flexibility:  Simple systems are more easily extended.
  • Delivering high value:  You are creating functionality that actually means something to the users.

YAGNI isn’t laziness.
It is clever, economical development.
No more speculating on the future. Just get something built, maintain clean code and remain agile.

Omprakash Gajananan Changed status to publish
0