You ain't gonna need it

YAGNI (you ain't gonna need it) principle is one of my favorites.

You ain't gonna need it

When coding, one conjures something that didn't exist before. The process of creating a beautiful and powerful system is very rewarding. It is way too easy to lose track of original design requirements and start adding things just in case they are needed in the future.


When you look at the source code of beginner and compare it with what a seasoned developer would write for the same thing, experienced developer writes much less, and much simpler, code. It gets things done with no fooling around.

A beginner is struggling to formulate the solution. Experienced dev just needs to write it down.


We should not be writing code with writing beautiful code as an end-goal. Doing so signals we do not understand the ultimate purpose of the code. The ultimate, noble, purpose is to help end-users. To do so, we should be doing only the things that actually help the users do the thing they need done. Today.

Preparing for the future

Do not do that. Yes, now that you are writing code, you might as well make it more powerful than strictly needed. That's a good thing, right? No, it is a very bad thing.

We suck at predicting the future. Our users suck at predicting the future. Heck, they don't even know what is it they actually need until they start playing with the solution and realize they need something different. As each feature makes it harder  to maintain and transform the code, we should always be writing an absolute minimum of code.


Clear code is easy to read and understand. Less code is the ultimate clear code.