Ruby on Rails - you ain't gonna need it in ruby on rails- ruby on rails tutorial - rails guides - rails tutorial - ruby rayou ain't gonna need it in ruby on railsils
We can say “YAGNI” (You ain’t gonna need it) about a feature, we better not implement it. There can be a lot of development time saved through focussing onto simplicity. Implementing such features anyway can lead to problems
Examples
Overengineering
- If a product is more complicated than it has to be, it is over engineered. Usually these “not yet used” features will never be used in the intended way they were written and have to be refactored if they ever get used.
- Premature optimisations, especially performance optimisations, often lead to design decisions which will be proved wrong in the future.
Code Bloat
- Code Bloat means unnecessary complicated code. This can occur for example by abstraction, redundancy or incorrect application of design patterns.
- The code base becomes difficult to understand, confusing and expensive to maintain.
Feature Creep
- Feature Creep refers to adding new features that go beyond the core functionality of the product and lead to an unnecessarily high complexity of the product.
Long development time
- The time which could be used to develop necessary features is spent to develop unnecessary features. The product takes longer to deliver.
Solutions
Keep it simple, stupid(KISS)
According to KISS, most systems work the best if they are designed simple. Simplicity should be a primary design goal to reduce complexity. It can be achieved by following the “Single Responsibility Principle” for example.
You Ain’t Gonna Need it(YAGNI)
Less is more. Think about every feature, is it really needed? If we can think of any way that it’s YAGNI, leave it away. It’s better to develop it when it’s needed.
Continuous Refactoring
The product is being improved steadily. With refactoring, you can make sure that the product is being done according to best practice and does not degenerate to a patch work.