注冊(cè) | 登錄讀書好,好讀書,讀好書!
讀書網(wǎng)-DuShu.com
當(dāng)前位置: 首頁出版圖書科學(xué)技術(shù)計(jì)算機(jī)/網(wǎng)絡(luò)軟件工程及軟件方法學(xué)代碼整潔之道(英文版)

代碼整潔之道(英文版)

代碼整潔之道(英文版)

定 價(jià):¥59.00

作 者: (美)馬?。∕artin,R.C) 著
出版社: 人民郵電出版社
叢編項(xiàng): 典藏原版書苑
標(biāo) 簽: 軟件工程/開發(fā)項(xiàng)目管理

ISBN: 9787115210487 出版時(shí)間: 2009-08-01 包裝: 平裝
開本: 16開 頁數(shù): 431 字?jǐn)?shù):  

內(nèi)容簡(jiǎn)介

  軟件質(zhì)量,不但依賴于架構(gòu)及項(xiàng)目管理,而且與代碼質(zhì)量緊密相關(guān)。這一點(diǎn),無論是敏捷開發(fā)流派還是傳統(tǒng)開發(fā)流派,都不得不承認(rèn)。《代碼整潔之道(英文版)》提出一種觀念:代碼質(zhì)量與其整潔度成正比。干凈的代碼,既在質(zhì)量上較為可靠,也為后期維護(hù)、升級(jí)奠定了良好基礎(chǔ)。作為編程領(lǐng)域的佼佼者,《代碼整潔之道(英文版)》作者給出了一系列行之有效的整潔代碼操作實(shí)踐。這些實(shí)踐在《代碼整潔之道(英文版)》中體現(xiàn)為一條條規(guī)則(或稱“啟示”),并輔以來自現(xiàn)實(shí)項(xiàng)目的正、反兩面的范例。只要遵循這些規(guī)則,就能編寫出干凈的代碼,從而有效提升代碼質(zhì)量?!洞a整潔之道(英文版)》閱讀對(duì)象為一切有志于改善代碼質(zhì)量的程序員及技術(shù)經(jīng)理。書中介紹的規(guī)則均來自作者多年的實(shí)踐經(jīng)驗(yàn),涵蓋從命名到重構(gòu)的多個(gè)編程方面,雖為一“家”之言,然誠(chéng)有可資借鑒的價(jià)值。

作者簡(jiǎn)介

  RObert C.Ma rlin,(Bob大叔)自1970年進(jìn)入軟件行業(yè),從1990年起成為國(guó)際軟件咨詢師。他是Object Mentor公司的創(chuàng)始人和總裁。Object Mentor:是由一群經(jīng)驗(yàn)豐富的咨詢師組成的公司,他們的客戶遍及全世界。業(yè)務(wù)涉及C++、.Java、C#、Ruby、面向?qū)ο蟆⒃O(shè)計(jì)模式、UML、敏捷方法論和極限編程等領(lǐng)域。

圖書目錄

Chapter 1: Clean Code 1
There Will Be Code 2
Bad Code 3
The Total Cost of Owning a Mess 4
The Grand Redesign in the Sky 5
Attitude 5
The Primal Conundrum 6
The Art of Clean Code? 6
What Is Clean Code? 7
Schools of Thought 12
We Are Authors 13
The Boy Scout Rule 14
Prequel and Principles 15
Conclusion 15
Bibliography 15
Chapter 2: Meaningful Names 17
Introduction 17
Use Intention-Revealing Names 18
Avoid Disinformation 19
Make Meaningful Distinctions 20
Use Pronounceable Names 21
Use Searchable Names 22
Avoid Encodings 23
Hungarian Notation 23
Member Prexes 24
Interfaces and Implementations 24
Avoid Mental Mapping 25
Class Names 25
Method Names 25
Dont Be Cute 26
Pick One Word per Concept 26
Dont Pun 26
Use Solution Domain Names 27
Use Problem Domain Names 27
Add Meaningful Context 27
Dont Add Gratuitous Context 29
Final Words 30
Chapter 3: Functions 31
Small! 34
Blocks and Indenting 35
Do One Thing 35
Sections within Functions 36
One Level of Abstraction per Function 36
Reading Code from Top to Bottom: The Stepdown Rule 37
Switch Statements 37
Use Descriptive Names 39
Function Arguments 40
Common Monadic Forms 41
Flag Arguments 41
Dyadic Functions 42
Triads 42
Argument Objects 43
Argument Lists 43
Verbs and Keywords 43
Have No Side Effects 44
Output Arguments 45
Command Query Separation 45
Prefer Exceptions to Returning Error Codes 46
Extract Try/Catch Blocks 46
Error Handling Is One Thing 47
The Errorjava Dependency Magnet 47
Dont Repeat Yourself 48
Structured Programming 48
How Do You Write Functions Like This? 49
Conclusion 49
SetupTeardownIncluder 50
Bibliography 52
Chapter 4: Comments 53
Comments Do Not Make Up for Bad Code 55
Explain Yourself in Code 55
Good Comments 55
Legal Comments 55
Informative Comments 56
Explanation of Intent 56
Clarication 57
Warning of Consequences 58
TODO Comments 58
Amplication 59
Javadocs in Public APIs 59
Bad Comments 59
Mumbling 59
Redundant Comments 60
Misleading Comments 63
Mandated Comments 63
Journal Comments 63
Noise Comments 64
Scary Noise 66
Dont Use a Comment When You Can Use a Function or a Variable 67
Position Markers 67
Closing Brace Comments 67
Attributions and Bylines 68
Commented-Out Code 68
HTML Comments 69
Nonlocal Information 69
Too Much Information 70
Inobvious Connection 70
Function Headers 70
Javadocs in Nonpublic Code 71
Example 71
Bibliography 74
Chapter 5: Formatting 75
Chapter 6: Objects and Data Structures 93
Chapter 7: Error Handling 103
Chapter 8: Boundaries 113
Chapter 9: Unit Tests 121
Chapter 10: Classes 135
Chapter 11: Systems 153
Chapter 12: Emergence 171
Chapter 13: Concurrency 177
Chapter 14: Successive Renement 193
Chapter 15: JUnit Internals 251
Chapter 16: Refactoring SerialDate 267
Chapter 17: Smells and Heuristics 285
Appendix A:ConcurrencyⅡ
Appendix B:org.jfree.date.SerialDate
Appendix C:Cross References of Heuristics
Epilogue
Index

本目錄推薦

掃描二維碼
Copyright ? 讀書網(wǎng) hotzeplotz.com 2005-2020, All Rights Reserved.
鄂ICP備15019699號(hào) 鄂公網(wǎng)安備 42010302001612號(hào)