摘要:
1. 让注释保持紧凑 1 //反面示例 2 // The int is the CategoryType. 3 // The first float in the inner pair is the 'score', 4 // the second is the 'weight'. 5 typede 阅读全文
posted @ 2021-01-03 22:44
zziii
阅读(101)
评论(0)
推荐(0)
|
摘要:
1. 让注释保持紧凑 1 //反面示例 2 // The int is the CategoryType. 3 // The first float in the inner pair is the 'score', 4 // the second is the 'weight'. 5 typede 阅读全文
posted @ 2021-01-03 22:44
zziii
阅读(101)
评论(0)
推荐(0)
摘要:
1. 什么样的注释是不需要的 下面的例子中的全部注释没有提供任何新的信息,所以没有价值。 不要为能从代码中快速推断的事实写注释。 1 // The class definition for Account 2 class Account { 3 public: 4 // Constructor 5 阅读全文
posted @ 2020-12-31 17:05
zziii
阅读(122)
评论(0)
推荐(0)
摘要:
1. 为什么审美这么重要? 让人愉悦的代码更易读,因此更容易使用。 2. 重新安排换行来保持一致和紧凑 下面的代码有着优雅一致的风格,并且很容易从头看到尾快速浏览。 但是缺憾在于用了更多的纵向空间,并且注释重复了三遍。 1 public class PerformanceTester { 2 pub 阅读全文
posted @ 2020-12-31 12:10
zziii
阅读(102)
评论(0)
推荐(0)
摘要:
1. Filter(condition) "filter"是个二义性单词,应避免使用。因为不清楚是应该满足condition,还是应该不满足condition,容易引起误解。 2. Clip(text, length) Clip(text, length) //易产生歧义,不知道是保留前半部分还是后 阅读全文
posted @ 2020-12-31 11:39
zziii
阅读(93)
评论(0)
推荐(0)
摘要:
1.选择专业的词 GetPage(url) 应改为 FetchPage(url) or DownloadPage(url) BinaryTree::Size() 应改为 BinaryTree::Height() , BinaryTree::NumNodes() , or BinaryTree::Me 阅读全文
posted @ 2020-10-28 23:42
zziii
阅读(130)
评论(0)
推荐(0)
摘要:
此随笔由《编写可读代码的艺术》中抽取的主要思想及示例代码集合而成。 阅读全文
posted @ 2020-10-28 22:47
zziii
阅读(135)
评论(0)
推荐(0)
摘要:
(1) 备份数据库需要dba权限, SQL> grant exp_full_database to zdzc; (2) 创建备份脚本文件/backup/oracle/backup-oracle.sh,目录及文件的所有者均为oracle,组为oinstall。 (3) 需要Oracle用户使用其.ba 阅读全文
posted @ 2019-02-20 11:54
zziii
阅读(127)
评论(0)
推荐(0)
|