From 1e75b821485dd166267b91fed2e50710aad5c5ad Mon Sep 17 00:00:00 2001 From: elioat Date: Tue, 13 Dec 2022 11:02:59 -0500 Subject: * --- notes.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 -- cgit 1.4.1-2-gfad0