POLA

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. 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.241.82