Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Cannot retrieve contributors at this time
Programming principles (SOLID)
Single Responsibility Principle
Open Closed Principle
- Do one thing and do it well.
- Short and focused methods, small and focused classes.
Liskov Substitution Principle
- Be open for extension and closed for modification.
Interface Segregation Principle
- Derived classes can stand in for base classes.
- Replacing an object with an instance of a subtype shouldn't alter the correctness of a program.
- Make interfaces fine grained and client specific.
- Expose only those things that you absolutely have to.
- Many client-specific interfaces are better than one general-purpose interface.
Don't Repeat Yourself (DRY)
- Depend on abstractions, not concrete implementations.
The Boy Scout Principle
- Clipboard inheritance is an anti-pattern.
You Ain't Gonna Need It (YAGNI)
- Clean up after yourself, clean up after others.
- For instance, add some unit tests if there are none.
Separation Of Concerns
- Focus on current actual requirements.
- Focusing one's attention upon some aspect.
- For instance, don't mix your UI and your database logic all together.
- (Similar to Single Responsibility Principle).
Press h to open a hovercard with more details.