I just read this tweet from Mitchell Hashimoto (founder Hashicorp, that you may know for Vagrant, Terraform, Consul, Vault, Packer, Nomad,....)
My heuristic for overly clever or terse code: will another team member (new or not) reading this file top-to-bottom pause here? Is there a way to write it so they don’t? (Sometimes complexity is unavoidable!) If the answer is “yes”, do it, future maintainer will thank you.
It resonates with me, as it sometimes I've been trying to do more and more other the years, but never thought about it more like that.. kind of a habit, almost subconscious. He made me realize that, and that's a simple but super effective way to do it. It will go over all the common problems that make code hard to maintain: naming, splitting functions which are too long, reducing the number of variables, ordering things (all related to the cognitive load), and so on and so forth. A very easy but super effective way to get started!