随笔分类 -  Clean Code学习笔记

 
Classes
摘要:Class Organization Following the standard Java convention, a class should begin with a list of variables.Public static constants, if any, should come 阅读全文
posted @ 2016-10-17 17:26 forever_elf 阅读(170) 评论(0) 推荐(0)
Unit Tests
摘要:The Three Laws of TDD First Law : you may not write production code until you have written a failing unit test. Second Law : you may not write more of 阅读全文
posted @ 2016-09-06 12:07 forever_elf 阅读(207) 评论(0) 推荐(0)
Boundaries
摘要:Using Third-Party Code There is a natural tension between the provider of an interface and the user of an interface.Providers of third-party packages 阅读全文
posted @ 2016-08-23 10:56 forever_elf 阅读(211) 评论(0) 推荐(0)
Error Handling
摘要:Use Exceptions Rather Than Return Codes Back in the distant past there were many languages that didn't have exceptions.In those languages the techniqu 阅读全文
posted @ 2016-08-09 11:59 forever_elf 阅读(242) 评论(0) 推荐(0)
Objects and Data Structures
摘要:Date Abstraction Hiding implementation is not just a matter of putting a layer of fucntions between the variables.Hiding implementation is about abstr 阅读全文
posted @ 2016-08-05 11:08 forever_elf 阅读(174) 评论(0) 推荐(0)
Formatting
只有注册用户登录后才能阅读该文。
posted @ 2016-08-01 15:03 forever_elf 阅读(4) 评论(0) 推荐(0)
Comments
摘要:Nothing can be quite so helpful as a well-placed comment.Nothing can clutter up a module more than frivolous dogmatic comments.Nothing can be quite so 阅读全文
posted @ 2016-07-22 12:46 forever_elf 阅读(237) 评论(0) 推荐(0)
Functions
摘要:Small The first rule of functions is that they should be small.The second rule of functions is that they should be smaller than that.Functions should 阅读全文
posted @ 2016-07-20 11:39 forever_elf 阅读(326) 评论(0) 推荐(0)
有意义的命名 Meaningful names
摘要:名副其实 use intention-revealing names 变量、函数或类的名称应该已经答复了所有的大问题。它该告诉你,他为什么会存在,他做什么事,应该怎么用。我们应该选择都是致命了计量对象单位的名称。 避免误导 avoid disinformation 必修避免留下演示代码本意的错误线索 阅读全文
posted @ 2015-11-23 11:49 forever_elf 阅读(401) 评论(0) 推荐(0)
整洁代码
摘要:TPM(Total Productive Maintenance)主要支柱之一为5S原则体系。5S哲学包括以下概念:整理(Seiri),或谓组织、整顿(Seiton),或谓整齐、清楚(Seiso)或谓清洁、清洁(Seiketsu)或谓标准化、身美(Shitsuke)或谓纪律。 整洁的代码应可由... 阅读全文
posted @ 2015-11-20 17:27 forever_elf 阅读(210) 评论(0) 推荐(0)