Gather together the thigns that change for the same reasons. Separate things that change for different reasons
A module should be open for extension but closed for modification
disk file에 쓰는 것과, printer, screen, pipe에 쓰는 방법이 모두 다르다면
if
문이 넘쳐나고 개발이 힘들 것이다. requirement가 변하는 경우, 기존의 코드의 '일부'만 틀리게 되는 것이다. 틀린 '일부'를 위해 맞는 '대부분'의 코드를 수정하지 말자.
A program that uses an interface must not be confused by implementation of that interface
인터페이스는 어떠한 base를 abstraction하고 있는데, 인터페이스의 implementation 때문에 헷갈려서는 안된다. This principle is about keeping abstractions crisp and well-defined.
Keep interfaces small so that users don't end up depending on things they don't need
Depend in the direction of abstraction. High level modules should not depend upon low level details
원문: http://blog.cleancoder.com/uncle-bob/2020/10/18/Solid-Relevance.html