Same Name Different Meaning

Sometimes in code we find that the same names are used multiple places to mean different things. This is a CodeSmell that easily leads to misinterpretation.

Some examples:

Overloaded Vocabulary

This is the fault of DeGeneralization. Curses! Curses = The aptly named cursor control library under Unix??
Identical Identifiers
Reusing variables for different purposes is a sign that your function has probably run too long, or that the variable is in the wrong (too global) scope. [SplitTemporaryVariable -- page 128 of RefactoringImprovingTheDesignOfExistingCode book.]


CategoryNaming


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