YAGNI is such a great principle.
I can't emphasize this enough.<p>I once inherited a messed-up codebase.
The project started to solve the company's internal problem for the sales department, but they also wanted it as a complete SaaS.
So the former team implemented features like complex user management, request slotting, billing, etc.<p>It turned out that it required a lot of development time and money, and if they continued, they would fail to provide essential features to the original customer, the sales department.
So they decided to stop implementing features for SaaS but didn't remove them (because we'll need them later! Of course..).<p>Then I joined the team and helped develop and fix bugs.
It was a complete nightmare.
Every time I fixed something, somewhere I didn't know even it existed broke, and it somehow affected essential features.
No test (because why waste dev time), so I found it in the staging or sometimes in the production (the good thing was, almost no one used it, so it didn't matter).<p>Most members and the product owner agreed it was better to remove all unused features, but no one didn't want to spend their time cleaning such a mess.
So we continued to develop with all unnecessary features, paying attention not to break something implemented long ago, and no one knows why.
I left the team and don't know how it goes now.