If a class is too big,it should be added comment and have documentation. If the arithmetic is too hard to understand ,i think it should have data flow diagram.(5 points)
But if the documentation is too simple or no meaning,i don't think it should exist.
Don't use too many depths if/elseif,divide it and use function.
Format code before commiting code to cvs.
variable name should be only single meaning .it shouldn't be ambiguity.(5 points)
Because maintenance time is longer than coding time.
i think that if the variable name is integer type,it can like this $iName,if variable is string ,it can be $sName,if the variable name is double,it can be $dName,if it is array type,it can be $aName,if it is sql resultset ,it can be $rsName;if it is a tree type,i can be $trName.
Db Function and view Function should be separated.( 3 point)
Try to use exist framework,don't create yourself.(1 point)
Just Thinking
代码规范
最新推荐文章于 2025-04-01 09:32:12 发布