快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

Bad Smells in Code


1.Duplicated Code    Same expression in two methods of the same class: Extract Method    Same expression in two sibling subclass:Extract Method ,then Pull Up Field    Duplicated code in two unrelated classs:Extract Class/The method belongs only in one class and be invoked by the other class.

2.Long Method   A heuristic we follow is that whenever we feel the needd to comment something,we write a method instead(Extract Method).A good technology to identify the clumps of code to extract is to look for comments.Conditionals and loops also give signs for extraction.

3.Large Class   Extract Method

4.Long Parameters List   Replace Parameter with Method, Preserve Whole Object, Introduce Parameter Object.

5.Divergent Change   Extract Class.

6.Shotgun Surgery   Move Method, Move Field, Inline Class,.

7.Feature Envy   Move Method, Extract Method,.

8.Data Clumps   Extract Class, Introduce Parameter Object, Preserve Whole Object

9 Primitive Obseesion

10.Switch Statements    Extract Method

11.Parallel Inheritance Hierarchis

12.Lazy Class

13.Speculative Generality

14.Temporary Field

15.Message Chains

16.Middle Man

17.Inappropriate Intimacy

18.Alternative Classes with Different Interfaces

19.Incomplete Library Class

20.Data Class

21.Refused Bequest   Push Down Method and Push Down Field

22.Comments




返回类别: 教程
上一教程: What is hibernate?
下一教程: Java中实现基于Aspectwerkz的AOP开发

您可以阅读与"Bad Smells in Code"相关的教程:
· public int getKeyCode(int gameAction) 与 public int getGameAction(int keyCode)的区别
· Java String 的 equals() 方式可能的优化
· Java中得到一个字符串中每个字符的Unicode值
· RESIN/TOMCAT和MYSQL的连接解决方式
· eclipse 中 UnsatisifiedLinkError 的解决方式
    微笑服务 优质保证 索取样品