On Mon, Dec 12, 2022 at 06:55:31AM +1100, Dave Horsfall wrote:
On Sun, 11 Dec 2022, Michael Kj??rling wrote:
By definition, if you write code as cleverly as
you can, then you aren't
clever enough to debug it...
Indeed...
I've always used the maxim "Write code as though the next person to
maintain it is an axe-wielding psychopath who knows where you live".
My main job, for the 20 years until I retired, was to keep telling
people that code that you wrote 6 months ago might as well have been
written by someone else. Optimize for reading the code, not writing
the code. It's read many.
99.9% of the time, I detest clever code. .1% of the time, I need it.
The problem is that smart engineers adore writing clever code. They
usually, eventually, wise up.