# Quality Principles

1. KISS
2. DRY
3. YAGNI
4. SOLID

### 1 KISS Keep It Simple, Stupid <a href="#user-content-1-kiss-keep-it-simple-2c-stupid" id="user-content-1-kiss-keep-it-simple-2c-stupid"></a>

KISS is a popular design principle in software development and many other fields. It is an acronym for "Keep It Simple, Stupid", and is a colloquial way of saying that simple things work better.

Avoiding increasing the level of complexity when it is not strictly necessary brings multiple benefits, including improved understandability and maintainability, not to mention the sense of satisfaction of having written elegant code.

### 2 DRY Don’t repeat yourself <a href="#user-content-2-dry-don-e2-80-99t-repeat-yourself" id="user-content-2-dry-don-e2-80-99t-repeat-yourself"></a>

DRY emphasizes the importance of avoiding duplicity in source code, being the acronym for "Don't repeat yourself" and being supported by the assertion that each piece of code should have a unique, unambiguous and authoritative representation in the system.

### 3 YAGNI You aren’t gonna need it

YAGNI has its origin in extreme programming, where simplicity prevails and where it is chosen not to invest time in providing solutions to needs that do not yet exist.

### 4 SOLID <a href="#user-content-5-solid" id="user-content-5-solid"></a>

The principles on which SOLID is based are as follows:&#x20;

1. Single Responsibility Principle ( Single Responsibility Principle )&#x20;
2. Open/Closed Principle ( Open/Closed Principle )&#x20;
3. Liskov Substitution Principle&#x20;
4. Interface Segregation Principle&#x20;
5. Dependency Inversion Principle

Single responsibility principle

Each unit of code must do only one thing.

Open/Closed Principle

The Open/Closed principle tells us that a code entity must be open to extension and closed to modification.

Liskov Substitution Principle

The Liskov substitution principle says that each class that inherits from another can be used in place of the parent without needing to know its differences.

Interface Segregation Principle

The principle of interface segregation says that no class should be forced to depend on methods it does not use. We must use small interfaces.

Dependency Inversion Principle

The dependency inversion principle says that high-level modules should not depend on low-level modules, nor should abstractions of details.
