
Problems
Unnecessary Indirection
Empty Classes
Readability
Solutions
- Remove Middle man.
Sample Code
Wrong
Right
Detection
Same as its opposite smell, We can detect this small using parsing trees.
Tags
Coupling
Declarative
Readability
Conclusion
This is exactly the opposite to Message Chain. We make explicit the message chain.
Relations
More info
Credits
Photo by Dan Counsell on Unsplash
Whenever I have to think to understand what the code is doing, I ask myself if I can refactor the code to make that understanding more immediately apparent.
Martin Fowler
This article is part of the CodeSmell Series.
About the author
I’m a senior software engineer loving clean code, and declarative designs. S.O.L.I.D. and agile methodologies fan.
Comments
Join the discussionNo comments yet. Be the first to comment.
Code Smells
In this series, we will see several symptoms and situations that make us doubt the quality of our developments. We will present possible solutions. Most are just clues. They are no hard rules.





