代码整洁之道(异步图书)

代码整洁之道(异步图书)
作者:
马丁(Robert C. Martin)
语言:
中文
类型:
EPUB
页数:
431页
大小:
5.71 MB
出版社:
人民邮电出版社
出版时间:
2009-12-31
ISBN:
9787115244901
分类:

内容简介

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

软件质量,不但依赖于架构及项目管理,而且与代码质量紧密相关。
这一点,无论是敏捷开发流派还是传统开发流派,都不得不承认。

《代码整洁之道(英文版)》阅读对象为一切有志于改善代码质量的程序员及技术经理。
书中介绍的规则均来自作者多年的实践经验,涵盖从命名到重构的多个编程方面,虽为一“家”之言,然诚有可资借鉴的价值。

目录

Chapter I: Clean Code
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
Bibliography
Chapter 2: Meaningful Names
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 Words
Chapter 3: Functions
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
Function Arguments
Common Monadic Forms
Flag Arguments
Dyadic Functions
Triads
Argument Objects
Argument Lists
Verbs and Keywords
Have No Side Effects
Output Arguments
Command Query Separation
Prefer Exceptions to Returning Error Codes
Extract Try/Catch Blocks
Error Handling Is One Thing
The Error. java Dependency Magnet
Don’t Repeat Yourself
Structured Programming
How Do You Write Functions Like This?
Conclusion
Setup Teardown Includer
Bibliography
Chapter 4: Comments
Comments Do Not Make Up for Bad Code
Explain Yourself in Code
Good Comments
Legal Comments
Informative Comments
Explanation of Intent
Clarification
Warning of Consequences
TODO Comments
Amplification
Javadocs in Public APIs
Bad Comments
Mumbling
Redundant Comments
Misleading Comments
Mandated Comments
Journal Comments
Noise Comments
Scary Noise
Don’t Use a Comment When You Can Use a
Function or a Variable
Position Markers
Closing Brace Comments
Attributions and Bylines
Commented-Out Code
HTML Comments
Nonlocal Information
Too Much Information
Inobvious Connection
Function Headers
Javadocs in Nonpublic Code
Example
Bibliography
Chapter 5: Formatting
The Purpose of Formatting
Vertical Formatting
The Newspaper Metaphor
Vertical Openness Between Concepts
Vertical Density
Vertical Distance
Vertical Ordering
Horizontal Formatting
Horizontal Openness and Density
Horizontal Alignment
Indentation
Dummy Scopes
Team Rules
Uncle Bob’s Formatting Rules
Chapter 6: Objects and Data Structures
Data Abstraction
Data/Object Anti-Symmetry
The Law of Demeter
Train Wrecks
Hybrids
Hiding Structure
Data Transfer Objects
Active Record
Conclusion
Bibliography
……

下载权限
查看
  • 免费下载
    评论并刷新后下载
    登录后下载
  • {{attr.name}}:
您当前的等级为
登录后免费下载登录 小黑屋反思中,不准下载! 评论后刷新页面下载评论 支付以后下载 请先登录 您今天的下载次数(次)用完了,请明天再来 支付积分以后下载立即支付 支付以后下载立即支付 您当前的用户组不允许下载升级会员
您已获得下载权限 您可以每天下载资源次,今日剩余
免责申明
1. 本站分享的所有书籍均来源于自互联网,我们只进行收集整理,并不对书籍内容进行更改。
2. 部分书籍中可能有书籍压制者放置的广告,这并不是本站所为,请注意甄别。
3. 我们分享这些书籍,纯粹是出于知识分享的热情,以及对互联网分享精神的高度认同和践行,不以盈利为目的。
4. 本站分享的所有书籍,仅供个人学习研究使用,请勿用于任何商业用途,否则产生的一切法律纠纷与本站无关。
5. 如果这些书籍让你有所收获,在条件允许的情况下,请一定购买正版书籍,这是对创作者最好的支持。
6. 如果您是此书籍的版权所有者,且您不希望此作品出现在本站,请联系我们,我们将在收到您的请求后48小时内予以删除。

📖 支持知识自由流动

每一本书的稳定访问,都离不开服务器、存储与带宽的长期维护。

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
今日签到
有新私信 私信列表
搜索