๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

Clean code: a handbook of agile software craftsmanship

โœ Scribed by Martin, Robert Cecil


Publisher
Prentice Hall
Year
2008;2009
Tongue
English
Leaves
465
Series
Robert C. Martin Series
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


Even bad code can function. But if code isn t clean, it can bring a development organization to its knees. Every year, countless hours and significant resources are lost because of poorly written code. But it doesn t have to be that way.
Noted software expert Robert C. Martin presents a revolutionary paradigm withClean Code: A Handbook of Agile Software Craftsmanship. Martin has teamed up with his colleagues from Object Mentor to distill their best agile practice of cleaning code on the fly into a book that will instill within you the values of a software craftsman and make you a better programmer but only if you work at it.
What kind of work will you be doing? You ll be reading code lots of code. And you will be challenged to think about what s right about that code, and what s wrong with it. More importantly, you will be challenged to reassess your professional values and your commitment to your craft.
Clean Codeis divided into three parts. The first describes the principles, patterns, and practices of writing clean code. The second part consists of several case studies of increasing complexity. Each case study is an exercise in cleaning up code of transforming a code base that has some problems into one that is sound and efficient. The third part is the payoff: a single chapter containing a list of heuristics and smells gathered while creating the case studies. The result is a knowledge base that describes the way we think when we write, read, and clean code.
Readers will come away from this book understanding

How to tell the difference between good and bad code How to write good code and how to transform bad code into good code How to create good names, good functions, good objects, and good classes How to format code for maximum readability How to implement complete error handling without obscuring code logic How to unit test and practice test-driven development This book is a must for any developer, software engineer, project manager, team lead, or systems analyst with an interest in producing better code.
"

โœฆ Table of Contents


Contents......Page 8
Foreword......Page 20
Introduction......Page 26
On the Cover......Page 30
Chapter 1: Clean Code......Page 32
There Will Be Code......Page 33
Bad Code......Page 34
The Total Cost of Owning a Mess......Page 35
Attitude......Page 36
The Art of Clean Code?......Page 37
What Is Clean Code?......Page 38
Schools of Thought......Page 43
We Are Authors......Page 44
The Boy Scout Rule......Page 45
Bibliography......Page 46
Introduction......Page 48
Use Intention-Revealing Names......Page 49
Avoid Disinformation......Page 50
Make Meaningful Distinctions......Page 51
Use Pronounceable Names......Page 52
Use Searchable Names......Page 53
Hungarian Notation......Page 54
Interfaces and Implementations......Page 55
Method Names......Page 56
Don't Pun......Page 57
Add Meaningful Context......Page 58
Don't Add Gratuitous Context......Page 60
Final Words......Page 61
Chapter 3: Functions......Page 62
Small!......Page 65
Do One Thing......Page 66
One Level of Abstraction per Function......Page 67
Switch Statements......Page 68
Use Descriptive Names......Page 70
Function Arguments......Page 71
Flag Arguments......Page 72
Triads......Page 73
Verbs and Keywords......Page 74
Have No Side Effects......Page 75
Command Query Separation......Page 76
Extract Try/Catch Blocks......Page 77
The Error.java Dependency Magnet......Page 78
Structured Programming......Page 79
Conclusion......Page 80
SetupTeardownIncluder......Page 81
Bibliography......Page 83
Chapter 4: Comments......Page 84
Legal Comments......Page 86
Explanation of Intent......Page 87
Clarification......Page 88
TODO Comments......Page 89
Mumbling......Page 90
Redundant Comments......Page 91
Journal Comments......Page 94
Noise Comments......Page 95
Scary Noise......Page 97
Closing Brace Comments......Page 98
Commented-Out Code......Page 99
Nonlocal Information......Page 100
Function Headers......Page 101
Example......Page 102
Bibliography......Page 105
Chapter 5: Formatting......Page 106
Vertical Formatting......Page 107
The Newspaper Metaphor......Page 108
Vertical Openness Between Concepts......Page 109
Vertical Density......Page 110
Vertical Distance......Page 111
Vertical Ordering......Page 115
Horizontal Formatting......Page 116
Horizontal Openness and Density......Page 117
Horizontal Alignment......Page 118
Indentation......Page 119
Uncle Bob's Formatting Rules......Page 121
Data Abstraction......Page 124
Data/Object Anti-Symmetry......Page 126
The Law of Demeter......Page 128
Train Wrecks......Page 129
Hiding Structure......Page 130
Data Transfer Objects......Page 131
Bibliography......Page 132
Chapter 7: Error Handling......Page 134
Use Exceptions Rather Than Return Codes......Page 135
Write Your Try-Catch-Finally Statement First......Page 136
Use Unchecked Exceptions......Page 137
Define Exception Classes in Terms of a Caller's Needs......Page 138
Define the Normal Flow......Page 140
Don't Return Null......Page 141
Don't Pass Null......Page 142
Bibliography......Page 143
Chapter 8: Boundaries......Page 144
Using Third-Party Code......Page 145
Learning log4j......Page 147
Using Code That Does Not Yet Exist......Page 149
Bibliography......Page 151
Chapter 9: Unit Tests......Page 152
The Three Laws of TDD......Page 153
Keeping Tests Clean......Page 154
Clean Tests......Page 155
A Dual Standard......Page 158
One Assert per Test......Page 161
Single Concept per Test......Page 162
F.I.R.S.T.......Page 163
Bibliography......Page 164
Chapter 10: Classes......Page 166
Classes Should Be Small!......Page 167
The Single Responsibility Principle......Page 169
Cohesion......Page 171
Maintaining Cohesion Results in Many Small Classes......Page 172
Organizing for Change......Page 178
Isolating from Change......Page 180
Bibliography......Page 182
Chapter 11: Systems......Page 184
Separate Constructing a System from Using It......Page 185
Factories......Page 186
Scaling Up......Page 188
Cross-Cutting Concerns......Page 191
Java Proxies......Page 192
Pure Java AOP Frameworks......Page 194
Test Drive the System Architecture......Page 197
Optimize Decision Making......Page 198
Systems Need Domain-Specific Languages......Page 199
Bibliography......Page 200
Getting Clean via Emergent Design......Page 202
Simple Design Rules 2โ€“4: Refactoring......Page 203
No Duplication......Page 204
Expressive......Page 206
Bibliography......Page 207
Chapter 13: Concurrency......Page 208
Why Concurrency?......Page 209
Myths and Misconceptions......Page 210
Concurrency Defense Principles......Page 211
Corollary: Use Copies of Data......Page 212
Thread-Safe Collections......Page 213
Know Your Execution Models......Page 214
Dining Philosophers......Page 215
Keep Synchronized Sections Small......Page 216
Testing Threaded Code......Page 217
Make Your Threaded Code Tunable......Page 218
Instrument Your Code to Try and Force Failures......Page 219
Automated......Page 220
Conclusion......Page 221
Bibliography......Page 222
Chapter 14: Successive Refinement......Page 224
Args Implementation......Page 225
How Did I Do This?......Page 231
Args: The Rough Draft......Page 232
On Incrementalism......Page 243
String Arguments......Page 245
Conclusion......Page 281
Chapter 15: JUnit Internals......Page 282
The JUnit Framework......Page 283
Conclusion......Page 296
Chapter 16: Refactoring SerialDate......Page 298
First, Make It Work......Page 299
Then Make It Right......Page 301
Bibliography......Page 315
Chapter 17: Smells and Heuristics......Page 316
C3: Redundant Comment......Page 317
E2: Tests Require More Than One Step......Page 318
G2: Obvious Behavior Is Unimplemented......Page 319
G5: Duplication......Page 320
G6: Code at Wrong Level of Abstraction......Page 321
G8: Too Much Information......Page 322
G11: Inconsistency......Page 323
G14: Feature Envy......Page 324
G15: Selector Arguments......Page 325
G17: Misplaced Responsibility......Page 326
G19: Use Explanatory Variables......Page 327
G21: Understand the Algorithm......Page 328
G22: Make Logical Dependencies Physical......Page 329
G24: Follow Standard Conventions......Page 330
G25: Replace Magic Numbers with Named Constants......Page 331
G28: Encapsulate Conditionals......Page 332
G31: Hidden Temporal Couplings......Page 333
G32: Don't Be Arbitrary......Page 334
G34: Functions Should Descend Only One Level of Abstraction......Page 335
G36: Avoid Transitive Navigation......Page 337
J2: Don't Inherit Constants......Page 338
J3: Constants versus Enums......Page 339
N1: Choose Descriptive Names......Page 340
N3: Use Standard Nomenclature Where Possible......Page 342
N6: Avoid Encodings......Page 343
T4: An Ignored Test Is a Question about an Ambiguity......Page 344
Conclusion......Page 345
Bibliography......Page 346
The Server......Page 348
Server Observations......Page 350
Possible Paths of Execution......Page 352
Number of Paths......Page 353
Digging Deeper......Page 354
Executor Framework......Page 357
Nonblocking Solutions......Page 358
Nonthread-Safe Classes......Page 359
Dependencies Between Methods Can Break Concurrent Code......Page 360
Client-Based Locking......Page 361
Server-Based Locking......Page 363
Increasing Throughput......Page 364
Single-Thread Calculation of Throughput......Page 365
Deadlock......Page 366
Mutual Exclusion......Page 367
Breaking Mutual Exclusion......Page 368
Breaking Circular Wait......Page 369
Testing Multithreaded Code......Page 370
Conclusion......Page 373
Client/Server Nonthreaded......Page 374
Client/Server Using Threads......Page 377
Appendix B: org.jfree.date.SerialDate......Page 380
Appendix C: Cross References of Heuristics......Page 440
Epilogue......Page 442
A......Page 444
B......Page 445
C......Page 446
D......Page 448
F......Page 450
G......Page 451
I......Page 452
L......Page 453
M......Page 454
O......Page 455
P......Page 456
R......Page 457
S......Page 458
T......Page 460
V......Page 461
X......Page 462

โœฆ Subjects


Computer Science;Programming;Science;Technology;Software;Technical;Nonfiction;Coding;Computers;Engineering;Reference


๐Ÿ“œ SIMILAR VOLUMES


Clean code a handbook of agile software
โœ Feathers, Michael C.; Langr, Jeffrey J.; Martin, Robert C.; Ottinger, Timothy R. ๐Ÿ“‚ Library ๐Ÿ“… 2016 ๐Ÿ› Prentice Hall ๐ŸŒ English

Even bad code can function. But if code isn t clean, it can bring a development organization to its knees. Every year, countless hours and significant resources are lost because of poorly written code. But it doesn t have to be that way.<br />Noted software expert Robert C. Martin presents a revolut