Coding convention from TL

来源:互联网 发布:淘宝客浏览器插件 编辑:程序博客网 时间:2024/04/28 23:04

1. Be careful to add protective mechanism to prevent possible errors.

2. save the repetitive calling truck to one variable for readability.

3. Group codes to each section for readability.

4. Consider which part of the line should generate possible errors and prevent it.

5. If error check in the beginning, just exit method, do not use if-else, it increases difficulties when the else part is really long.  

0 0
原创粉丝点击