Principles & SOLID
SOLID, DRY, KISS and YAGNI — the principles your code gets judged by.
0/44
- 1What does the Single Responsibility Principle mean?Middle
- 2How do you determine that a class or module violates SRP?Middle
- 3Why does SRP simplify code maintenance?Middle
- 4How is SRP related to the concepts of "cohesion" and "coupling"?Middle
- 5Give an example of an SRP violationMiddle
- 6Give an example of a class that follows SRPMiddle
- 7How does SRP improve application modularity?Middle
- 1What does the Open/Closed Principle mean?Middle
- 3How does OCP help avoid bugs when making changes?Middle
- 4How do you implement OCP through inheritance?Middle
- 5How do you implement OCP through composition?Middle
- 6Why is OCP closely tied to interfaces?Middle
- 7Why does OCP reduce the number of regressions?Middle
- 8Why does OCP reduce coupling?Middle
- 1What does the Dependency Inversion Principle mean?Middle
- 2Why is DIP the foundation of IoC and DI?Middle
- 3What does "high-level modules should not depend on low-level modules" mean?Middle
- 4Example of a DIP violationMiddle
- 5Example of DIP complianceMiddle
- 6Why does DIP increase system flexibility?Middle
- 7How does DIP help with testing?Middle
- 9What does "depend on abstraction, not on implementation" mean?Middle
- 10Why does DIP improve scalability?Middle