Code Smell 64 - Inappropriate Intimacy

Code Smell 64 - Inappropriate Intimacy

Two classes entangled in love.

Maxi Contieri
·Mar 27, 2021·

2 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article


  • Coupling

  • Bad Responsibilities Assignments

  • Bad Cohesion

  • Class Interfaces too Public

  • Maintainability

  • Extensibility


  1. Refactor

  2. Merge

  3. Replace Hierarchy With Delegation.

Sample Code



Some linters graph class relations and protocol dependency. Analyzing the collaboration graph we can infer rules and hints.


  • Coupling


It two classes are too related and don't talk much to others we might need to split, merge or refactor them, Classes should know as little about each other as possible.


More info


Photo by Becca Tapert on Unsplash

No matter how slow you are writing clean code, you will always be slower if you make a mess.

Robert Martin

This article is part of the CodeSmell Series.

Share this


Technical Opinions are my own. I don't have the revealed truth.

Software Design is a creative activity. These are hints and not rigid rules.

I write on BackEnd Business Systems and OOP Design. My advice/experience might not suit other systems.

You can write me at info(at)