Single Letter Named Variables

SingleLetterNamedVariables are when a variable name uses a single letter, though the language allows many more than one character, thus limiting the descriptive potential of the variable name. They are almost always bad practice outside of confined spaces, such as for loops. It is very difficult to understand $n when $n is $m and not very $o.

Equally bad are generic names not pertaining to the inferred logic, such as naming a variable "integer_array_1", unless the function they are in specifically deals with generic data transformations (such as an array merge function, taking two inputs named 'array_1' and 'array_2'). It is very difficult to understand something when it is verbing an adjective noun.


EditText of this page (last edited October 22, 2012) or FindPage with title or text search