Code Smells

Bloaters

Oleksandr Kaledin
1 min readNov 3, 2023

Bloaters are code behemoths that have become so unwieldy and difficult to understand that they are a menace to maintain. They are often the result of years of accumulated technical debt, and they can be a major obstacle to progress.

  • Long Method
  • Large Class
  • Primitive Obsession
  • Long Parameter List
  • Data Clumps

Object-Orientation Abusers

These code smells reveal a flawed understanding of object-oriented programming, leading to code that is difficult to maintain, understand, and extend.

  • Alternative Classes with Different Interfaces
  • Refused Bequest
  • Switch Statements
  • Temporary Field

Change Preventers

Code smells that make code changes ripple through the system, increasing the complexity and cost of software development.

  • Divergent Change
  • Parallel Inheritance Hierarchies
  • Shotgun Surgery

Dispensable

Code dispensables are unnecessary elements that clutter up the codebase and make it more difficult to maintain. Refactoring to remove dispensable can improve code readability, efficiency, and understandability

  • Comments
  • Duplicate Code
  • Data Class
  • Dead Code
  • Lazy Class
  • Speculative Generality

Couplers

Code smells in this group make classes too clingy to each other or show what happens when the coupling is replaced with excessive outsourcing, resulting in a brittle and complex system.

  • Feature Envy
  • Inappropriate Intimacy
  • Incomplete Library Class
  • Message Chains
  • Middle Man

Check more stories

Code Smell

23 stories

--

--

Oleksandr Kaledin

iOS App Developer with 2+ years' experience. Expert in Swift, Xcode, and tech writing.