It's hard to over-emphasize the importance names bring to the maintainability of code. They're the first thing a maintainer sees, and they're often the last thing a novice code thinks about. Textbooks provide notoriously bad examples that students follow in the real code.
- cryptic, e.g.,
- vague, e.g.,
- verbose, e.g.,
- misleading, e.g.,
numfor something that holds a
list of numbers
- plain English or conventional
- say what a function returns or does, e.g.,
never how it does it, e.g.,
- be either a verb-object, e.g.,
- be semantic for application-specific functions, e.g.,
- be generic for general utilities,
Much more to come on this topic.