Better Names for Martin Fowler's "Refactoring Smells"

Martin Fowler's Refactoring (1999) is a landmark book for software engineering. It is a catalog of techniques for cleaning up code. Unfortunately, this remarkable book is tarnished by some frivolous names chosen for its list of "refactoring smells" (anti-patterns). Unlike the memorable pattern names from that other luminous book Design Patterns (1995) – Singleton, Observer, Visitor, etc. – the anti-pattern names in Refactoring sometimes degenerate into the ludicrous: Feature Envy, Inappropriate Intimacy, Primitive Obsession, Speculative Generality, ...
The worst part is that these names give little clue as to what they mean.
I would like to propose alternative names for some of Fowler's "refactoring smells". Many of the names are fine as is, but a number of them benefit from sober clarity of expression:
| Old Name | New Name |
|---|---|
| Alternative Classes with Different Interfaces | Heterogeneous Interfaces |
| Comments | |
| Data Class | |
| Data Clumps | |
| Divergent Change | Schizophrenic Class |
| Duplicated Code | |
| Feature Envy | Satellite Method |
| Inappropriate Intimacy | Internal Access |
| Incomplete Library Class | |
| Large Class | |
| Lazy Class | Small Class |
| Long Method | |
| Long Parameter List | |
| Message Chains | Temporary Variables |
| Middle Man | Overdelegation |
| Parallel Inheritance Hierarchies | |
| Primitive Obsession | Procedural Code |
| Refused Bequest | Weak Inheritance |
| Shotgun Surgery | ? |
| Speculative Generality | Overdesign |
| Switch Statements | |
| Temporary Field |
I would also like to improve on "Shotgun Surgery" (in which a modification involves touching code in several places), but I cannot think of an apt name. Any suggestions?





5 Comments:
your suggestions are confusing. don't attempt to sound clever - the Fowlers names are crystal clear, and your names are opaque.
By
Anonymous, at 1/13/2007 2:59 a.m.
Possibility for Shotgun Surgery: Widespread Modification
By
Jonathan, at 1/13/2007 1:30 p.m.
I find "code smell" a little unpleasant so I know where you are coming from. But I _like_ "feature envy" and a few of the others. They give a flavour of the problem at least as well as or perhaps better than a straightforward description of the problem. "Small Class" isn't immediately a problem, but a "Lazy Class" is (it doesn't do enough, right, and I last picked that book up in about 2001 so that isn't from memory).
By
Thomas David Baker, at 1/13/2007 4:12 p.m.
bakert - Yeah, I kind of like Shotgun Surgery myself.
By
Jonathan, at 1/13/2007 5:21 p.m.
Perhaps "Tiny Class" instead of "Small Class"? I'm not in favour of "Lazy Class" because lazy has several connotations (notably "delayed").
By
Jonathan, at 1/13/2007 5:23 p.m.
Post a Comment
<< Home