Filters
  • Expanse
  • Between
    Within
  • Obstruction
  • Bloaters
    Change Preventers
    Couplers
    Data Dealers
    Dispensables
    Functional Abusers
    Lexical Abusers
    Obfuscators
    Object Oriented Abusers
    Other
  • Occurrence
  • Conditional Logic
    Data
    Duplication
    Interfaces
    Measured Smells
    Message Calls
    Names
    Responsibility
    Unnecessary Complexity
  • Smell Hierarchies
  • Antipattern
    Architecture Smell
    Code Smell
    Design Smell
    Implementation Smell
    Linguistic Smell
  • Tags
  • Major
    Minor
Code Smells Catalog

Obfuscators - Unnecessary Complexity

Clever Code

I am creating a conscious distinction between the Obscured Intent and Clever Code. While Obscured Intent addresses the ambiguity of implementation…

Dispensables - Duplication

Duplicated Code

Duplicated Code does not need further explanation. According to Fowler, redundant code is one of the worst smells [1]. One thing is that this makes…

Lexical Abusers - Names

Fallacious Comment

Comments differ from most other syntaxes available in programming languages; it is not executed. This might lead to situations where, after code…

Lexical Abusers - Names

Fallacious Method Name

When I started to think of Code Smells from the comprehensibility perspective (of its lack of) as one of the critical factors, I was pretty…

Couplers - Responsibility

Afraid To Fail

The Afraid To Fail is a Code Smell name inspired by the common fear (at least among students [1]) of failure, which is professionally called…

Object Oriented Abusers - Duplication

Alternative Classes with Different Interfaces

If two classes have the same functionality but different implementations, developers should merge them, or developers…

Object Oriented Abusers - Interfaces

Base Class depends on Subclass

The rule is that the child classes should be deployable independently from the parent class. That allows us to deploy the system in…

Couplers - Names

Binary Operator in Name

This is straightforward: method or function names that have binary bitwise operators like and are obvious candidates for undisguised…

Lexical Abusers - Names

Boolean Blindness

In the Haskell community, there is a well-(un)known question about the filter function - does the filter predicate means to or to (check example…

Change Preventers - Conditional Logic

Callback Hell

Smell with a scent similar to the Conditional Complexity, where tabs are intended deep, and the curly closing brackets can cascade like a Niagara…

Bloaters - Responsibility

Combinatorial Explosion

The Combinatorial Explosion occurs when a lot of code does almost the same thing - here, the word "almost" is crucial. The number of cases…

Obfuscators - Conditional Logic

Complicated Boolean Expression

One should keep in mind that Boolean Expressions can be troublesome for some people (in other words, not as quick to comprehend as if…

Obfuscators - Names

Complicated Regex Expression

Two bad things can be done that I would refer to as Complicated Regex Expression. First and foremost, we should avoid the unnecessary…

Object Oriented Abusers - Conditional Logic

Conditional Complexity

In data-oriented programming, the usage of -like statements (lengthy, cascading statements or /) should be relatively rare. One such switch…

Bloaters - Data

Data Clump

Data Clumps refer to a situation in which a few variables are passed around many times in the codebase instead of being packed into a separate object…

Dispensables - Unnecessary Complexity

Dead Code

If part of the code is not executed, it is a Dead Code. This code smell includes any place that the code executor will never reach, including the code that…

Change Preventers - Responsibility

Divergent Change

If adding a simple feature makes the developer change many seemingly unrelated methods inside a class, that indicates the Divergent Change code…

Change Preventers - Responsibility

Dubious Abstraction

The smaller and more cohesive class interfaces are the better because they tend to degrade over time. They should provide a constant abstraction…

Couplers - Responsibility

Fate over Action

In Object-Oriented Programming, classes and their data go hand in hand with behavior. If a class has only the first part, it is an indicator that…

Couplers - Responsibility

Feature Envy

If a method inside a class manipulates more features (be it fields or methods) of another class more than from its own, then this method has a Feature…

Change Preventers - Conditional Logic

Flag Argument

Martin Fowler defines Flag Arguments as a "kind of function argument that tells the function to carry out a different operation depending on its value…

Data Dealers - Data

Global Data

The Global Data is quite similar to the Middle Man code smell, but here rather than a class, the broker is the global scope in which the data is freely…

Data Dealers - Data

Hidden Dependencies

Hidden Dependency is a situation where, inside a class, methods are silently resolving dependencies, hiding that behavior from the caller. Hidden…

Functional Abusers - Unnecessary Complexity

Imperative Loops

Martin Fowler has the feeling that loops are an outdated concept. He already mentioned them as an issue in his first edition of "Refactoring…

Object Oriented Abusers - Interfaces

Inappropriate Static

The rule of thumb given by uncle Robert is that when in doubt, one should prefer non-static methods to static methods. The best way to check…

Other - Interfaces

Incomplete Library Class

Libraries are the savior of time and money in the industry of software development. If we had to reimplement our algorithms and tools every…

Lexical Abusers - Names

Inconsistent Names

Human brains work in a pattern-like fashion. Starting from the first class, the concept of operation and use of each subsequent class should be…

Obfuscators - Names

Inconsistent Style

The same thing as in Inconsistent Names applies to the general formatting and code style used in the project. Browsing through the code should…

Couplers - Data

Indecent Exposure

Unnecessarily exposing internal details is an Indecent Exposure code smell. The methods and variables of a class that works only with other same…

Data Dealers - Responsibility

Insider Trading

The classes should know as little as possible about each other. As Fowler put it, "classes spend too much time delving in each other's private parts…

Bloaters - Measured Smells

Large Class

When one combines the smell of Long Method and Long Parameter List, but on a higher abstraction level, then he would get the Large Class code smell. Many…

Dispensables - Unnecessary Complexity

Lazy Element

A Lazy Element is an element that does not do enough. If a method, variable, or class does not do enough to pay for itself (for increased complexity of…

Bloaters - Measured Smells

Long Method

One of the most apparent complications developers can encounter in the code is the length of a method. The more lines of code a function has, the more…

Bloaters - Measured Smells

Long Parameter List

This is another code smell at the same abstraction level as Long Method which usually occurs when three, four, or more parameters are given as…

Lexical Abusers - Names

Magic Number

The problem with floats and integers is that they convey no meaning - there is only context, which is often not enough, and even if one might think it…

Data Dealers - Message Calls

Message Chain

Suppose that class requires data from class , but to retrieve those data, it has to make unnecessary calls to class sequentially and then to get it…

Data Dealers - Message Calls

Middle Man

The class that only performs delegation work to other classes is called a Middle Man. This is the opposite of the Message Chains. Encapsulation (hiding…

Functional Abusers - Data

Mutable Data

Mutable data are harmful because they can unexpectedly fail other parts of the code. It is a rich source of bugs that are hard to spot because they can…

Bloaters - Conditional Logic

Null Check

Null check is widespread everywhere because the programming languages allow it. It causes a multitude of or checks everywhere: in guard checks, in…

Obfuscators - Unnecessary Complexity

Obscured Intent

The Obscured Intent Code Smell, initially proposed by Robert Martin in "Clean Code" [37]), is cross-smelly with other smells in the Obfuscators…

Bloaters - Duplication

Oddball Solution

If a similar problem is solved differently in different parts of the project, it is an Oddball Solution. This code smell could also have been…

Change Preventers - Responsibility

Parallel Inheritance Hierarchies

This occurs when an inheritance tree depends on another inheritance tree by composition, and to create a subclass for a class, one…

Bloaters - Data

Primitive Obsession

Whenever a variable that is just a simple , or an simulates being a more abstract concept, which could be an object, we encounter a Primitive…

Object Oriented Abusers - Interfaces

Refused Bequest

Whenever a subclass inherits from a parent but only uses a subset of the implemented parent methods, that is called Refused Bequest. This behavior…

Bloaters - Responsibility

Required Setup or Teardown Code

If, after the use of a class or method, several lines of code are required to: set it properly up, the environment requires specific…

Change Preventers - Responsibility

Shotgun Surgery

Similar to Divergent Change, but with a broader spectrum, the smell symptom of the Shotgun Surgery code is detected by the unnecessary requirement of…

Functional Abusers - Responsibility

Side Effects

The first or second most essential functional programming principle (interchangeably, depending on how big we want to set the statement's tone) is that…

Change Preventers - Conditional Logic

Special Case

Wake addresses the complex conditional situation as a Special Case code smell with two symptoms - a complex statement and/or value checking before…

Dispensables - Unnecessary Complexity

Speculative Generality

Developers are humans, and humans are bad guessers [1]. Developers tend to create additional features in preparation for the future, guessing…

Obfuscators - Unnecessary Complexity

Status Variable

Status Variables are mutable primitives that are initialized before an operation to store some information based on the process and are later used as…

Object Oriented Abusers - Data

Temporary Field

Temporary Field is a variable created where it is not needed. It refers to variables only used in some situations [1] or specific areas of a program…

Data Dealers - Data

Tramp Data

This is very similar to the Message Chains code smell, but with the difference that there, the pizza supplier was ordered to go through a long chain of…

Couplers - Names

Type Embedded in Name

Whenever a variable has an explicit type prefix or suffix, it can strongly signal that it should be just a class of its own. For example…

Lexical Abusers - Names

Uncommunicative Name

The name should convey meaning and meaning that is preferably not misleading (Fallacious Method Name). Descriptive names can save countless…

Obfuscators - Measured Smells

Vertical Separation

There is a tendency to declare variables in one place together before the main "logic" of the method begins. This detachment creates an…

Dispensables - Names

"What" Comment

Recognizing all comments as Code Smells is controversial and raises many different opinions. For this reason, I define a concrete subcategory of…

On GitHub Preprint Springer Paper Author
Copyright © 2022 Marcel Jerzyk. All rights reserved.