1.写好程序注释的十三条建议
https://www.cnblogs.com/iyangyuan/archive/2012/12/05/2803842.html
我觉得最近可以改进的地方:
(1)写代码前先写注释,再去一步一步实现
如下所示:
public void ProcessOrder() {
// Make sure the products are available
// Check that the customer is valid
// Send the order to the store
// Generate bill
}
(2)在代码段前面进行注释
每一个方法前面注释:描述功能
类前可以有简单的作者和描述,修改的日期
2.面向对象的设计
SOLID原则