Sunday, June 27, 2021

What is simplicity in programming and why does it matter?

We have seen a couple of examples of simplicity in practice. What have I learned from those and the aforementioned talks?

Simple means not tangled; there aren’t multiple things, concerns, roles, concepts or dimensions interleaved together. It thus also depends on the number and nature of interactions and their shape or tangleness. When we combine things together, we want to make composites (where the elements can be separated again) rather than compounds (where they are inextricably mixed and interleaved). Simplicity is objective because - if we can distinguish them - we can count how many simpler elements are there, tangled together.

Simple is not "pretty" because you are exposed to the (simple) constituent parts and the plumbing to combine them together, it is more verbose. (Though you can easily provide a custom convenience wrappers.)

What is simple is not necessarily easy. "Easy" means "close to me" and thus "accessible to me". A thing is easy for me to understand when it is close to what I already know, when I am somewhat familiar with it. Nothing wrong with that but simplicity is far more important - and often it requires some measure of novelty, which makes it by definition not easy.

Simplicity enables change and thus cheaper maintenance and allows for a more robust software.

We want to look for simple elements - "simples" - that are also powerful, often thanks to being generic, i.e. not overly limited to what they apply to. For example data is generic - it can carry any information.

Simplicity is not easy to achieve. It requires a fair amount of deep thinking, hard work, and likely multiple attempts to uncover.



from Hacker News https://ift.tt/3jaMrhl

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.