Primitive Obsession
Primitive data types are the building block of any data representation. So, practically anyone can represent any data with primitive data types. We study programming logic by using primitive data types in school. So, everyone in software development world is comfortable to use primitive data types. It's easy to use, fast to execute and uses minimum memory.
But in object oriented programming using primitive data type to represent data makes huge complexity. Using primitive data types is the main reason to have code smells in the code. It is one of the main reason for duplicate code, large class and long method code smells. In most cases using primitive data types breaks most of the design principal.
If you feel that something is very wrong in your code, code smells like duplicate code, large class, long method all together then try to find if there is any primitive obsession exist in your code. If you find it and refactor the primitive obsession then that would help you to easily refactor other code smells.
Primitive obsession code smells is not limited to data types provided by any compiler. An object like XmlBuilder, StringBuilder, HashTable , Dictionary, Lists are also creates primitive obsession. So, use all these objects intelligently to avoid primitive obsession.
