Here we have some concepts that we use while we're developing a software, each of them have his own importance in the project. It takes time and experience to understand them and put in practice, but once you understand them, you become a better developer.
YAGNI: You are not going to need it.
Create things that you are not gonna need in the future
Always study your context before creating something, try to solve the problem you currently have and not all the problems you may have in the future.
Don't do a premature optimization, prefer verbose codes to crazy abstractions.
KISS: Keep it stupid simple
Simple and stupid dictates that your code should be stupidly and simple to understand, in a way that an external person can understand what is happening in the application, without depending on someone to explain each piece.
The concept of writing the same code in fewer lines may not always be beneficial, as 20-line code in many cases can be more readable than one of 5, making it easier to maintain.
Descriptive codes are better, for example, do not abbreviate words that may cause confusion to those who are not in the context of what is happening.
DRY: Don't repeat yourself
The concept of DRY is not tied to repeating code but rather not repeating business rules or specific operation.
When we have too much automated or abstracted code is difficult to maintain, because you can have lots of logics that run without you even know when and where.
To conform to DRY, we can isolate a piece of code that is used in multiple locations and turn it into a use case, which would be used in all these places.