转自这
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 earlydo not generalize earlytry to avoid very long functions
转载于:https://www.cnblogs.com/litstrong/archive/2012/10/11/2719498.html