CLOSE
Updated on 21 Jun, 20268 mins read 15 views

Imagine you are asked to build:

A simple blogging platform.

Current requirements:

Create Post
Edit Post
Delete Post
View Post

A developer starts thinking:

What if someday we support:
- Multiple languages?
- AI Content generation?
- Plugin Marketplace?
- Offline sync?
- Distributed storage?
- Blockchain verification?

Months later:

10,000 lines of code

have been written.

The project still doesn't support:

Create Post

properly.

The team spent time building:

Features Nobody Asked For

This is one of the most common causees of software bloat.

To solve this problem, the Agile community introduced:

YAGNI

Historical background

YAGNI originated in Extreme Programming (commonly called XP)

created by: Kent Beck

The core observation:

Teams were spending enormous effort building:

Potential Features

instead of:

Actual Features

Most of those potential features:

Were Never Used

Thus: YAGNI

Official Definition

Always implement things when you actually need them, never when you just foresee that you may need them.

Simple version:

Don't build for imaginary requirements.

The Fundamental Problem

Developers are often afraid of future change.

They think:

Let's nbuild flexibility now.

Examples:

Maybe we'll support 50 databases.

Maybe we'll support 20 payment providers.

Maybe we'll support 100 notification channels.

Reality:

One database.
One payment provider.
One notification channel.

for years.

The extra architecture becomes:

Dead Weight

Real-World Analogy

Imagine building a house.

Current family:

2 Adults
1 Child

Instead of building:

3 Bedrooms

You build:

25 Bedrooms
3 Swimming Pools
Helicopter Pad
Movie Theater

Why?

Maybe someday…

This is exactly how many software systems are built.

YAGNI says:

Build the third bedroom first.

The Cost of Unused Features

Many engineers underestimate this.

Unused code is not free.

Every feature creates:

Implementation Cost
Testing Cost
Documentation Cost
Maintenance Cost
Bug Cost
Refactoring Cost

Even if nobody uses it.

Unused code is still:

Code You Must Maintain

 

Buy Me A Coffee

Leave a comment

Your email address will not be published. Required fields are marked *

Your experience on this site will be improved by allowing cookies Cookie Policy