java specification_java规范(Java specification).doc

java规范(Java specification)

java规范(Java specification)

Hundred skills summary share: Java programming specifications of the experience

In August 23, 2010 by the luanjia Java programming. Listen to the message? Zi Liu said the specification, "every part of this standard has Taobao developers a miserable experience, this is a tragic history of developers -- Zi Liu (100 technical university). In view of the test department is also to write Ruby scripts and WebX test, in order to avoid our testers developers repeat mistakes, I put some common programming specification can be made a summary, I hope to help some of you.

1. write detailed notes at the branch and complex logic of the program

A) code specific processing (such as special conventions, similar strings, combinations or splits by a certain rule, returns different types of objects with List or Map, objects returned in transactions)

B) modified in some logical, complex, or important code, with the author, time, and annotation

Example:

/ * *

* find the main path according to category ID and represent a two dimensional array in the form of:

* [root class,.ID, Root Category. Name] [category X.ID, category X. name],... [category.ID, this category. Name].

*

* @param catPath

*

* @return String[][]

*

* /

String[][] getCategoryStringByPath (String catPath);

Experience: product line business has been relatively complex, and the business logic changes frequently, so the test summary the method with the business and the business logic, it has been deleted in the business logic changes or the business, can be found directly modify or delete this part of the test code, not a need or out of date has been retained in the program code, the code is more and more, more and more readable.

In the annotation of the 2. method, the specification of the parameter and the description of the return value should be written in detail

/ * *

* check whether the string is null or empty string , ''.

*

 
 

* StringUtil.isEmpty (null) = true

*

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值