by klauserc · 2y ago · 0 comments
It has kind of radicalized me against "pointless names". Names take up valuable space in the working memory of the reader. They need to carry their weight.
I've seen streams-like code with a variable for almost every step, immediately used the line below. I can understand when the reason is to "explain" the meaning of the intermediate step...but even so a comment is far better on my opinion.
I always try to inline every 1-use variable/method, unless there is a good reason for not doing so.
[0] https://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus...