Code Smells

Code Smells / Couplers / Inappropriate Intimacy

Inappropriate Intimacy code smell icon

Inappropriate Intimacy

Inappropriate Intimacy occurs when two classes are tightly linked to one another.

This is an indication that the classes should be merged, that some functionality belongs in a superclass of both original classes, or that the functionality belongs in an unrelated class.

Inappropriate Intimacy is a class overly reliant on another class, for a method overly reliant on a class, check out Feature Envy.

Left chevron Right chevron

Books about code smells

Learn to write better smelling code.

Refactoring: Improving the Design of Existing Code book cover

Refactoring: Improving the Design of Existing Code

Code smells: A Predictor of Remarkable Quality Improvement book cover

Code smells: A Predictor of Remarkable Quality Improvement

Clean Code: A Handbook of Agile Software Craftsmanship book cover

Clean Code: A Handbook of Agile Software Craftsmanship

I receive a commission on sales made from the above affiliate links.