To know a thing is to name it. True names have power.
Please use variables with meaningful names and have mercy on those who will maintain your code.
Easier said than done.
Something often overlooked: Even if well-crafted, which is rare, names will still reflect the intention, understanding and purpose of named objects at their point of naming. Which is subject to change, of course. As all things are.
From “How To Create Meaningful Names In Code” by Daan:
Probably the worst variable names that you can pick are uppercase O and lowercase L. This is because they look a lot like 0 and 1.
David Spivak: “This ones called the integers, and I don’t… Does anyone know what the Z stands for?” [Muffled response] “Ah.” [Shrugs] “… I didn’t even hear it but I said ‘Ah’ anyway.”
Leave a Reply