# SOLID Principles
SOLID is an acronym introduced by Robert C. Martin that describes five principles providing a foundational set of guidelines in [[object-oriented programming]] (OOP). The principles help ensure code remains scalable, flexible, and testable. So, what does the acronym stand for?
**S — [[single responsibility principle|Single Responsibility Principle]]**: A class should have one reason to change.
**O — [[open closed principle|Open/Closed Principle]]**: Classes should be open for extension, but closed for modification.
**L — [[liskov substitution principle|Liskov Substitution Principle]]**: Subclasses must be substitutable for their parent classes.
**I — [[interface segregation principle|Interface Segregation Principle]]**: Interfaces should be small and focused.
**D — [[dependency inversion principle|Dependency Inversion Principle]]**: Depend on abstractions, not concrete implementations.
## Why should we care?
As features accumulate, code can become rigid and difficult to modify. The SOLID principles provide design habits that keep systems modular and maintainable. They align closely with [[blog/engineering/testing/test driven development]] (TDD): both require more upfront structure, but both pay off significantly as projects scale. Code that’s testable is also reusable, and SOLID helps keep components loosely coupled and easy to swap.
These five principles form the backbone of maintainable object-oriented systems. When applied consistently, they make code easier to understand, test, and extend. They also strengthen the structure of software at every level—from individual methods to architectural decisions—helping you build systems that grow gracefully rather than chaotically.