Pro Ep 7 : Understanding YAGNI Principle via C#

Muhammad Waseem
Become .NET Pro !
1 min readFeb 20, 2023

YAGNI stands for you aren’t gonna need it. It demands from developers to focus only on those requirements/functionalities that are needed instead of those about which developer think that could be helpful in future.

While coding as a developer we add some code by thinking that this could be useful for some ABC situation and add those lines , there YAGNI comes in action and stops us from adding those lines that are not needed.

Applying YAGNI can give us following benefits
1. Better development performance by focusing only on current requirement
2. More cost-optimized development
3. Flexible code base

Let’s understand it with a simple example.

If you want to help the author in growing

  1. Subscribe my Weekly .NET Newsletter of C#/.NET
  2. Follow me on LinkedIn/Twitter OR Clap at least 50 times.
  3. Get exclusive .NET Questions & Answers by becoming a Patron , I add almost 25+ new questions with explanation per month.
  4. Download my eBook at Gum road that contains 30 .NET Tips.

--

--