Code Smells
Code Smells / Dispensables / Dead Code

Dead Code
A Dead Code smell occurs when code is not used, be it a variable, method, class, or parameter.
This code smell is often created when code has become obsolete, and so is not instantiated, called, initialised, etc.
The offending code causes codebase clutter, and may cause confusion later on in development, slowing development.
To fix this code smell, such code should be deleted. Offending code can be easily found using most IDEs.
Books about code smells
Learn to write better smelling code.

Refactoring: Improving the Design of Existing Code

Code smells: A Predictor of Remarkable Quality Improvement

Clean Code: A Handbook of Agile Software Craftsmanship
I receive a commission on sales made from the above affiliate links.