Bad Smells: Naming


Some tools to choose names can be:

Good names serve several functions:

To choose good names, use the following guides:

Among the bad odors that we can find within a class, those of moderate severity are those related to names:

Type Embedded in Name

To do

Use Rename Method/Field/Constant on a name to communicate intent without being so tied to a type.

Rewards

Contraindications

Uncommunicative Name

To do

Use Rename Method/Field/Constant to give it a better name.

Rewards

Improve communication.

Contraindications

Inconsistent Names

To do

Choose the best name and use Rename Method/Field/Constant to give the same name to the same concept. Once done, you will see that the classes look more similar than before. Then look for code duplication smells and eliminate them.

Rewards

2019-03-19
Written by Samuel de Vega.
Tags