Chapter 2: Packing
Information Into Names
Alejandro Arboleda Henao
Choosing Specific Words
It’s better to be clear and precise than to be cute.
Avoiding Generic Names
● The name retval doesn’t pack much information. Instead, use a name that
describes the variable’s value.
● The name tmp should be used only in cases when being short-lived and
temporary is the most important fact about that variable.
● Sometimes there are better iterator names than i, j, and k
Using Concrete Names Instead Of Abstract
Names
Attaching Extra Information To a Name, By Using
A Suffix Or Prefix
Deciding How Long A Name Should Be

taorc