|
|
|
|
|
by pjbster
981 days ago
|
|
To my mind, all discussions about code design boil down to the reduction of cognitive load (CL). “Cognitive load refers to the amount of effort that is exerted or required while reasoning and thinking. Any mental process, from memory to perception to language, creates a cognitive load because it requires energy and effort. When cognitive load is high, thought processes are potentially interfered with. To the UX designer, a common goal when designing interfaces would be to keep users’ cognitive load to a minimum.” (https://speakerdeck.com/fedepaol/reducing-cognitive-load-yet...) In this context, "users" can be substituted with "other developers". Writing low-CL code is a constant balancing act and, like good UX design, when it works the nuances are invisible and therefore hard to learn from. So I appreciate the OP for the article even if we can quibble about some of the points. |
|
With cognitive load it doesn't even generalize. Who hasn't worked with somebody who joined a project and then immediately started changing the code to be more aligned to their taste in idioms to reduce the cognitive load. Their cognitive load that is. Not necessarily anybody else's.