Journey to the Clean Code: #1 What is Dirty Code?
The code, which was first written by a software engineer, is like a draft of a book. Because the code is still a draft, the code is dirty in nature (dirty code). It is possible that this draft code has the following characteristics.
God Class. Class that is too long and does too many things.
God Method. The method is too big and does too much.
Featured Envy. Method that is in the wrong class.
Methods and classes that are difficult to Unit Test.
Algorithms and code that are still being copied and pasted from sources on the internet.
Algorithms are still complex and inefficient when measured by Big-O Notation.
Naming variables, classes, and methods that are not self-explaining.