| You're not alone. 3 to 5 letters works best for me. Obligatory reference, given the aesthetic: https://archive.vn/mIwG0 My rule of thumb is to avoid variable names that are only used once. Instead, use something like pipeline operators, flow(), etc. Another preference I have is to use initialisms. Might feel dumb at first, but eventually you realize (or I did, at least) that it matters more how things are "braided together" than having perfect names, and your editor prolly highlights all the uses of the variable where you have your cursor. But, as always, prefer consistency with the rest of the team, even if you feel the rule is dumb. Don't proselytize. If the style really gets in your way to understanding the code, rewrite it and throw it away. There's something elucidating (and satisfying) in seeing a non-obvious piece of code in your native style. |
Reply: "You're not alone. 3 to 5 letters works best for me."
I mostly agree with your comment, also the "prefer consistency with the rest of the team" part, but you are not proposing the same as what OP described.