diff options
author | elioat <elioat@tilde.institute> | 2022-12-13 11:02:59 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2022-12-13 11:02:59 -0500 |
commit | 1e75b821485dd166267b91fed2e50710aad5c5ad (patch) | |
tree | 79861e67da87c07bb128107d01c2387aaeb90843 | |
parent | d35c29e1272a8c5b6bcabc92485cd256ac1ff538 (diff) | |
download | december-2022-1e75b821485dd166267b91fed2e50710aad5c5ad.tar.gz |
*
-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 |