写代码

转自

  • try to write as less code as possible.
  • refactor your code often; trying to avoid duplicate stuff, improving its readability and simplifying its structure without changing its results.
  • comment your code as much as possible (comments do not count as code :) )
  • avoid complex code structure with large class hierarchies that are used only once and in a single path.
  • do not optimize early
  • do not generalize early
  • try to avoid very long functions
posted @ 2012-10-11 10:25  litstrong  阅读(131)  评论(0编辑  收藏  举报