|
此文章由 kenadams001 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 kenadams001 所有!转贴必须注明作者、出处和本声明,并保持内容完整
楼主客气了。我没有注意到楼主是要关注注释的英文表达。前面说的都是注释方法,关于英语我觉得还是简明易懂为主,核心应该是描述编码思路和意图。下面是对英文的一点建议:
// Loop the array of the objects of branch and add the children nodes of the root node.
“Loop the array“ 好像没有这样写的,一般表达遍历应该是iterate through. 要是我写的话,可能会是 iterate through all branchs in the collection, create a tree node for each branch and add the them into the colleage node.
// First of all, add the child nodes of studenttype with each college node.
一般来说注释里面最好不要有代码语言,比如变量名称studenttype。这里studenttype并不是很清楚,应该使用实际业务的说法。注释可以写成: iterate through the course collection, create a treenode for the [studenttype-使用业务名称] which belongs to [那个条件的说明] and add them into the branch.
// In this place, the studenttype key is composed by branchId and studenttypeId.
这句实际上在解释代码,最好说明这个key的用途。比如:combine the IDs of the current branch and student type as a key used to judge whether the current student type should be added into the current branch.
我的英文纯属一般,仅供参考。 |
|