Clean Code (1): Meaningful Method Signature

Remove useless method

Remove method never referenced

  1. If method or API is not used any more, it is better to remove them rather than keep them.
  2. Version control/management tools should/will keep old version for you.

Method naming shortly and easy to understood its propose

Attributes in signature should consistent

For example, some method could have attribute "String data", if there are different type of data: text string, byte array string, int value.... It is better to create dedicated method for specific data type or add a new attribute to identify data type. Otherwise, future maintenance could mix them by mistake.

 

 

你可能感兴趣的:(Clean Code)