A code is (translated to) a set of instructions to the computer. To us humans, the code in a programming language(!) should clearly communicate our goal, and how we get there.
For example, what should a weather prediction code look like?
The first and the (almost) only one:
KIS — Keep It Simple
More like a tool to achieve the first:
DRY — Don’t Repeat Yourself
In addition to the abstract of this talk, there are many books written about why intelligent people write ugly code.
The cure that I can give is:
Publish your code, maintain it, and collaborate!
https://jlento.github.io/linux-2/exercises/00-StudyTips.html