I just realized. The more you comment your code and make it understandable, the easier it is for other people to takeover and rewrite your code. This means that when you retire/pass-away, your code will likely be quickly overwritten and your legacy gone from the active code base.
So, if you write complex clever code with little to no documentation, your code is more likely to be immortalized in the code base as everyone will be too afraid to touch it and possibly break it.
I thought of this when looking into the Linux TTY code base
@rostedt drivers/tty is terrifying. I avoid it as much as possible.
@rostedt Would it be possible to gradually replace it with something halfway sane?
@rostedt On the other hand your product has better chances to survive when it is maintainable and adjustable. Else it will soon become this legacy monster that everyone is trying to get rid of.
@rostedt wow, what a bad reason to get immortalized. Maybe when writing kernel code we should keep in mind that we are then potentially immortalized like a villain in a history book.
@rostedt $ git blame --all | grep rostedt
fatal: no such path '--all' in HEAD
@rostedt we unfortunately acquired a corner in a drm driver which fits this description too 🙄
the only feasible changes we could pull off was to wrap a fixed uapi around it that made most of the internal objects invariant over their lifetimes. because there's just no way anyone will ever figure out how the locking actually works, or was meant to work. we could only pull this off because drm userspace is all open and well-known
no such option for tty