Code Style Guidelines for Contributors Reading Notes

Reading Notes:
1、You must handle every Exception in your code in some principled way.
(if you are confident that actually ignoring the exception is appropriate then you may ignore it, but you must also comment why with a good reason)
2、Don't Catch Generic Exception.
3、we don't use finalizers.(there are no guarantees as to when a finalizer will be called, or even that it will be called at all.)
4、import foo.Bar;
(Makes it obvious what classes are actually used. Makes code more readable for maintainers.)
5、When creating new components never use deprecated libraries.
6、Every class and nontrivial public method you write must contain a Javadoc comment with at least one sentence describing what the class or method does.
7、Write Short Methods
If a method exceeds 40 lines or so, think about whether it can be broken up without harming the structure of the program.
8、Fields should be defined either at the top of the file.
9、The scope of local variables should be kept to a minimum
10、Loop variables should be declared in the for statement itself unless there is a compelling reason to do otherwise
11、We use 8 space indents for line wraps
12、Non-public, non-static field names start with m.Static field names start with s.Other fields start with a lower case letter.Public static final fields (constants) are ALL_CAPS_WITH_UNDERSCORES.
13、Braces do not go on their own line
14、Each line of text in your code should be at most 100 characters long.
15、Use Standard Java Annotations
16、Use TODO comments for code that is temporary, a short-term solution, or good-enough but not perfect.
17、Log Sparingly
18、Follow Test Method Naming Conventions(testMethod_specificCase1、testIsDistinguishable_protanopia)

 

thanks

jack.lee

转载于:https://www.cnblogs.com/jackxlee/p/CodeStyleGuidelines.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
社会发展日新月异,用计算机应用实现数据管理功能已经算是很完善的了,但是随着移动互联网的到来,处理信息不再受制于地理位置的限制,处理信息及时高效,备受人们的喜爱。所以各大互联网厂商都瞄准移动互联网这个潮流进行各大布局,经过多年的大浪淘沙,各种移动操作系统的不断面世,而目前市场占有率最高的就是微信小程序,本次开发一套基于微信小程序的生签到系统,有管理员,教师,学生三个角色。管理员功能有个人中心,学生管理,教师管理,签到管理,学生签到管理,班课信息管理,加入班课管理,请假信息管理,审批信息管理,销假信息管理,系统管理。教师和学生都可以在微信端注册和登录,教师可以管理签到信息,管理班课信息,审批请假信息,查看学生签到,查看加入班级,查看审批信息和销假信息。学生可以查看教师发布的学生签到信息,可以自己选择加入班课信息,添加请假信息,查看审批信息,进行销假操作。基于微信小程序的生签到系统服务端用Java开发的网站后台,接收并且处理微信小程序端传入的json数据,数据库用到了MySQL数据库作为数据的存储。这样就让用户用着方便快捷,都通过同一个后台进行业务处理,而后台又可以根据并发量做好部署,用硬件和软件进行协作,满足于数据的交互式处理,让用户的数据存储更安全,得到数据更方便。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值