Learning Object Oriented Programming
April 9, 2023
ยท
1 min read
key themes:
consistency could be something as simple as conditionls (ifs).
It is useful to be consistent in the patterns.
This reduces complexity and makes it easier to read the code later.Duplication
As with all principles, moderation is the key.
Whereever relevant reduce duplication of code logic and data.
Reduces complexity and improves maintainability and testing.Naming
Methods should be unique in what it does - (single responsibility principle)
To make this expicit care should be given to name to communicate intent.
the cost of bad naming increases as the code becomes older.