看了martin fowler 的Refactoring,Improving the Design of Existing Code一书好好看了一下目录,对bad smells in code深有感触。
Duplicated code, Long Methods, Large class, Long Parameter List, Divergent Change, Shortgun Surgery, Feature Envy, Data Clumps, Primitive Obsession, Switch Statements, parallel Inheritance Hierarchies, Lazy Class, Speculative Generality, Temporary Field, Message Chains, Middle Man, Inappropriate Intimacy, Altemative Classes with Different Interfaces, Incomplete Library Class, Data Class, Refused Bequest, Comments
很多bad smells只是一个量的问题。 Large class, Long Methods, Long Parameter List, Switch Middle Man Temporyary Field, 对于这种涉及到量的问题,个人总感觉有些难以把握,看了书以后再说吧