Common Code Smells
Dead's Code
All of us would dispose of a pet goldfish if it met an unhappy end. Yet how many of us dispose of code that is no longer being used?
Code that is no longer used in a system or related system is Dead Code. Far too much dead code exists in software systems.
Its presence often leads to:
- Increased Complexity. Dead code increases the size of a code base, which makes a system harder to comprehend, maintain and extend.
- Accidental Changes. Since it can be easy to mistake dead code for real code, programmers can waste time by accidentally extending or improving dead code without realizing it.
- More Dead Code. Once it becomes acceptable to leave dead code in a system, new dead code has a way of accumulating.
(Reading...)
Formatting Hints:
To format... | use this markup: |
---|---|
source code | {source:lang=java|lineNumbers=false}...{source} (Supported languages: java, cpp, csharp, c, python.) |
bold text | __some text__ |
italicized text | ~~some text~~ |
underlined text | @@some text@@ |
a method or class name | ``myMethod(...)`` |