DEV Community

Cover image for The YAGNI Principle
Ahmed Atef
Ahmed Atef

Posted on

The YAGNI Principle

أحد المبادئ الهامة وإختصار آخر قد يكون متعارف عليه بين مهندسي البرمجيات ولكن البعض لايجيدون تطبيق المبدأ

You Aren’t Gonna Need It⚠️
على الأقل في مراحل التطوير المبكرة في التطبيقات ، لأننا كمطورون نتطلع لمستقبل المشروع اللي بنشتغل عليه في الوقت الحالي ، فبالتالي قد يخطأ البعض في إضافة المزيد من ال Extra Features الغير ضرورية للمشروع واللي يظن البعض انها ضرورية في الوقت الحالي ولكن الحقيقة غير ضرورية على المدى البعيد للمشروع وقد تكون ضرورية في مراحل متقدمة في المشروع.
هذا المبدأ يندرج تحت مصطلح extreme programming (XP) والذي يشير إلى تنفيذ خطوات بسيطة التي تعمل وتُحقق الهدف منها ، وينتج عن تطبيق هذا المبدأ
✅ توفير المزيد من الوقت المُهدر في إضافة خطوات غير ضرورية
✅ المُضي في إستكمال المشروع بشكل كُفئ.
“Always implement things when you actually need them, never when you just foresee that you need them.”

Another acronym that’s popular among software engineers, YAGNI means “You Aren’t Gonna Need It”. This principle focuses on eliminating any unnecessary coding and works in tandem with the KISS principle.

– Sometimes, as developers, we try to think way ahead, into the future of the project, coding some extra features “just in case we need them” or thinking“we will eventually need them”. Just one word: Wrong! You didn’t need it, you don’t need it and in most of the cases… “You Aren’t Gonna Need It”.

YAGNI is a principle behind the extreme programming (XP) practice of “Do the Simplest Thing That Could Possibly Work”. Even when this principle is part of XP, it is applicable in all kinds of methodologies and processes of development. By implementing the ideals of “You Aren’t Gonna Need It” programming, you will save yourself time and be able to move forward with projects efficiently.

Top comments (0)