Let's look at the POLA principle:
- P: Principle
- O: Of
- L: Least
- A: Astonishment
POLA states that a software component should be easy to understand and its behavior should never be a surprise (or, more accurately, astonishing) to the client. How do we do that?
The following are some things to keep in mind:
- Make sure that the names of the module, function, or function arguments are clear and unambiguous.
- Ensure that modules are right-sized and well maintained.
- Ensure that interfaces are small and easy to understand.
- Ensure that functions have few positional arguments.