“Solid” and “Programming Principles” are terms that refer to guidelines for writing high-quality, maintainable software.
- SOLID: SOLID is an acronym that stands for five principles of object-oriented programming and design. They are:
- Single Responsibility Principle: A class should have only one reason to change
- Open/Closed Principle: Software entities should be open for extension, but closed for modification.
- Liskov Substitution Principle: Subtypes must be substitutable for their base types.
- Interface Segregation Principle: Clients should not be forced to depend on interfaces they do not use.
- Dependency Inversion Principle: High-level modules should not depend on low-level modules. Both should depend on abstractions.
- Programming Principles: Programming principles are a set of guidelines and best practices that help to ensure that software is maintainable, readable, and efficient. Examples include:
- Don’t Repeat Yourself (DRY)
- Keep it Simple, Stupid (KISS)
- YAGNI (You Ain’t Gonna Need It)
- Boy Scout Rule
- Separation of Concerns (SoC)
Adhering to these principles leads to better code quality, reduced technical debt, and easier collaboration among teams.