The principle of least power dictates that one should always choose to use as little power as necessary to cleanly achieve the goal.
This principle goes hand-in-hand with the “default deny” approach — give as little access as is absolutely necessary to accomplish the task.
Using the principle of least power allows you to keep code and systems lean and easy to understand — using an unnecessarily complicated way to solve a problem is often expensive in terms of resources, computational, or cognitive, when trying to understand what the code does, and coming to it with an expectation that “if they are using this complicated thing, it must be warranted”, only to have the expectation betrayed eventually, after you’ve spent the effort looking for what warranted the complexity.
Comments
Post a Comment