《Clean Code》简介:

《Clean Code(评注版)》提出一种观念:代码质量与其整洁度成正比。干净的代码,既在质量上较为可靠,也为后期维护、升级奠定了良好的基础。《Clean Code(评注版)》作者给出了一系列行之有效的整洁代码操作实践。这些实践在《Clean Code(评注版)》中体现为一条条规则(或称“启示”),并辅以来自现实项目的正、反两方面的范例。只要遵循这些规则,就能写出干净的代码,从而有效提升代码的质量。

《Clean Code(评注版)》适合致力于改善代码质量的程序员及技术经理阅读。《Clean Code(评注版)》介绍的规则均来自作者多年的实践经验,涵盖从命名到重构的多个方面,虽为一“家”之言,然诚有借鉴意义。

《Clean Code(评注版)》是Clean Code一书的评注版,力邀国内资深专家执笔,在英文原著的基础上增加了中文点评和注释,旨在融合二者之长,既保留经典的原创文字与味道,又以先行者的学研心得与实践感悟,对读者的阅读和学习加以点拨,指明捷径。

《Clean Code》摘录:

later equals never

《Clean Code》目录:

Chapter 1: Clean Code (新增评注47条) There Will Be Code Bad Code The Total Cost of Owning a Mess The Grand Redesign in the Sky Attitude The Primal Conundrum The Art of Clean Code? What Is Clean Code? Schools of Thought We Are Authors The Boy Scout Rule Prequel and Principles Conclusion BibliographyChapter 2: Meaningful Names (新增评注19条) Introduction Use Intention-Revealing Names Avoid Disinformation Make Meaningful Distinctions Use'Pronounceable Names Use Searchable Names Avoid Encodings Hungarian Notation Member Prefixes Interfaces and Implementations Avoid Mental Mapping Class Names Method Names Don't Be Cute Pick One Word per Concept Don't Pun Use Solution Domain Names Use Problem Domain Names Add Meaningful Context Don't Add Gratuitous Context Final WordsChapter 3: Functions (新增评注25条) Small Blocks and Indenting Do One Thing Sections within Functions One Level of Abstraction per Function Reading Code from Top to Bottom:The Stepdown Rule Switch Statements Use Descriptive Names ……
· · · · · ·