diff options
-rw-r--r-- | notes.txt | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/notes.txt b/notes.txt index 3f3909a..432e430 100644 --- a/notes.txt +++ b/notes.txt @@ -3,4 +3,18 @@ - Arithmetic operations are constant - Variable assignment is constant - Accessing element in an array (by index) or object (by key) is constant -- In a loop, the complexity is the length of the loop times the complexity of whatever happens inside of the loop \ No newline at end of file +- In a loop, the complexity is the length of the loop times the complexity of whatever happens inside of the loop + +# SOLID + +- Single responsibility principle + - a class should only have 1 reason to change + - *separation of concerns* -- different classes handling different, independent tasks/problems +- Open-closed principle + - classes should be open for extension but closed for modification +- Liskove substitution principle + - you should be able to substitute a base type of a subtype +- Interface segregation principle + - don't put too much into an interface; split into seperate interfaces +- Dependency inversion principle + - high-level modules should no depend on low-level ones; use abstraction \ No newline at end of file |