<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Object Mentor Blog: Clean Code.  Whew!</title>
    <link>http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Clean Code.  Whew!</title>
      <description>&lt;p&gt;I&amp;#8217;ve been working on this book for several years now.  After a flurry of effort (you might have noticed I&amp;#8217;ve been quiet lately) I&amp;#8217;m very pleased to say that I&amp;#8217;m done with the writing and am preparing the manuscript for production. See &lt;a href="http://www.pearsonhighered.com/educator/academic/product/1,3110,0132350882,00.html"&gt;The Prentice Hall Listing&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://vig-fp.prenhall.com/bigcovers/0132350882.jpg" alt="" /&gt;&lt;/p&gt;


&lt;pre&gt;Table of Contents

Clean Code    1
    There Will Be Code    1
    Bad Code    2
    The Total Cost of Owning a Mess.    3
    Schools of Thought.    11
    We are Authors.    12
    The Boy Scout Rule    13
    Prequel and Principles    14
    Conclusion    14
    Bibliography    15
Meaningful Names by Tim Ottinger    17
    Introduction    17
    Use Intention-revealing Names    17
    Avoid Disinformation    19
    Make Meaningful Distinctions    20
    Use Pronounceable Names    21
    Use Searchable Names    22
    Avoid Encodings    23
    Avoid Mental Mapping    24
    Class Names    25
    Method Names    25
    Don't Be Cute    25
    Pick One Word Per Concept    26
    Don't Pun    26
    Use Solution Domain Names    27
    Use Problem Domain Names    27
    Add Meaningful Context    27
    Don't add Gratuitous Context    29
    Final Words ...    30
Functions    31
    Small!    34
    Do one thing.    35
    One level of abstraction per function.    36
    Switch Statements.    37
    Use descriptive names.    39
    Function Arguments.    39
    Have no side-effects.    43
    Command Query Separation    44
    Prefer exceptions to returning error codes.    45
    Don't Repeat Yourself.    47
    Structured Programming    48
    How do you write functions like this?    48
    Conclusion    49
    SetupTeardownIncluder    49
    Bibliography    52
Comments    53
    Comments do not make up for bad code.    55
    Explain yourself in code.    55
    Good Comments    55
    Bad Comments    59
    Example    71
    Bibliography    74
Formatting    75
    The Purpose of Formatting    76
    Vertical Formatting    76
    Horizontal Formatting    84
    Team Rules    89
    Uncle Bob's Formatting Rules.    90
Objects and Data Structures    93
    Data Abstraction    93
    Data/Object anti-symmetry.    95
    The Law of Demeter    97
    Data Transfer Objects    99
    Conclusion    101
    Bibliography    101
Error Handling by Michael Feathers    103
    Use Exceptions Rather than Return Codes    103
    Write Your Try-Catch-Finally Statement First    105
    Use Unchecked Exceptions    106
    Provide Context with Exceptions    107
    Define Exception Classes In Terms of a Caller's Needs.    107
    Define the Normal Flow    109
    Don't Return Null    110
    Don't Pass Null    111
    Conclusion    112
    Bibliography    112
Boundaries by James Grenning    113
    Bibliography    119
Unit Tests    121
    The Three Laws of TDD    122
    Keeping Tests Clean    123
    Clean Tests    124
    One Assert per Test    129
    F.I.R.S.T.    132
    Conclusion    132
    Bibliography    133
Classes    135
    Class Organization    135
    Classes should be Small!    136
    Organizing for Change    146
    Bibliography    150
Systems    By Dean Wampler 151
    How would you build a city?    151
    Separate constructing a system from using it    152
    Scaling Up    155
    Java Proxies    158
    Pure Java AOP Frameworks    160
    AspectJ Aspects    163
    Test-drive the system architecture    164
    Optimize decision making    165
    Use standards wisely, when they add demonstrable value    165
    Systems need Domain-Specific Languages    166
    Conclusion    166
    Bibliography    167
Emergence By Jeff Langr    169
    Getting Clean via Emergent Design    169
    Simple Design Rule 1: Runs all the tests    170
    Simple Design Rules 2-4: Refactoring    170
    No Duplication    170
    Expressive    173
    Minimal Classes and Methods    174
    Conclusion    174
    Bibliography    174
Concurrency    by Brett Schuchert 175
    Why Concurrency?    176
    Challenges    177
    Concurrency Defense Principles    178
    Know Your Library    180
    Know Your Execution Models    181
    Beware Dependencies between Syncrhonized Methods    182
    Keep Synchronized Sections Small    183
    Writing Correct Shut-Down Code is Hard    183
    Testing Threaded Code    184
    Conclusion    188
    Bibliography    189
Successive Refinement    191
    Args Implementation    192
    Args: the rough draft.    198
    String Arguments    212
     Conclusion    246
JUnit Internals    249
    Conclusion    262
Refactoring SerialDate    263
    Conclusion    280
    Bibliography    281
Smells and Heuristics    283
    Comments    283
    Environment    284
    Functions    285
    General    285
    Java    304
    Names    306
    Tests    310
    Conclusion    311
    Bibliography    312
Concurrency II    by Brett Schuchert 313
    Client/Server Example    313
    Possible Paths of Execution    317
    Knowing Your Library    322
    Dependencies between methods can break concurrent code    325
    Increasing Throughput    329
    Deadlock    331
    Testing Multi-Threaded Code    335
    Tool Support for Testing Thread-Based Code    337
    Conclusion    338
    Tutorial: Full Code Examples    339
org.jfree.date.SerialDate    345
Cross References of Heuristics    406
&lt;/pre&gt;</description>
      <pubDate>Tue, 08 Apr 2008 00:10:16 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:0280362f-4830-42b9-84db-edaa724b41b1</guid>
      <author>Uncle Bob</author>
      <link>http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew</link>
      <category>Uncle Bob's Blatherings</category>
      <category>Clean Code</category>
    </item>
    <item>
      <title>"Clean Code.  Whew!" by rev</title>
      <description>&lt;p&gt;still got my &amp;#8216;test first&amp;#8217; bracelet.  when can we get this from amazon?&lt;/p&gt;</description>
      <pubDate>Tue, 27 May 2008 13:25:12 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:675f60c5-87af-4e7e-b3c1-5b43141359d1</guid>
      <link>http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew#comment-1786</link>
    </item>
    <item>
      <title>"Clean Code.  Whew!" by mBria</title>
      <description>&lt;p&gt;Congrats&amp;#8230;this is awesome news, I&amp;#8217;ve been waiting with baited breath.  If you&amp;#8217;re looking for reviewers, I&amp;#8217;d love to have the opportunity.  Cheers!
&lt;br&gt;   &amp;#8212;MB 
&lt;br&gt;(bria526 at gmail)&lt;/p&gt;</description>
      <pubDate>Mon, 19 May 2008 15:53:13 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:21b111ae-ef4c-4bd0-911e-eb1f93e84c49</guid>
      <link>http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew#comment-1774</link>
    </item>
    <item>
      <title>"Clean Code.  Whew!" by Aaron</title>
      <description>&lt;p&gt;Looking forward!&lt;/p&gt;


	&lt;p&gt;When exactly would this book be published?&lt;/p&gt;</description>
      <pubDate>Fri, 02 May 2008 00:05:35 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:cea3b70e-35aa-4433-acca-ef2f06b246d0</guid>
      <link>http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew#comment-1740</link>
    </item>
    <item>
      <title>"Clean Code.  Whew!" by TonyB</title>
      <description>&lt;p&gt;Looks good. I have a copy of Agile Principles, Practices and Patterns in C#, which is one of the most readable and clear software books I&amp;#8217;ve ever read. In fact it&amp;#8217;s the only one I&amp;#8217;ve ever finished. I appreciate many of these concepts are cross-language, but will the examples in the new book be oriented towards C#, Java or what?&lt;/p&gt;</description>
      <pubDate>Wed, 23 Apr 2008 08:52:30 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:dc975b5d-8e0f-4aad-b9d9-afecf9301bd3</guid>
      <link>http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew#comment-1723</link>
    </item>
    <item>
      <title>"Clean Code.  Whew!" by Pete</title>
      <description>&lt;p&gt;Look forward to reading the book and more blog posts!&lt;/p&gt;


	&lt;p&gt;I have three other books from the Robert C Martin series but none by the man himself. They&amp;#8217;re all quite brilliant in their own ways. &lt;i&gt;Working Effectively With Legacy Code&lt;/i&gt;, &lt;i&gt;Agile Java&lt;/i&gt; and &lt;i&gt;FIT for Software Development&lt;/i&gt;. I expect the quality of &lt;i&gt;Clean Code&lt;/i&gt; to be similar.&lt;/p&gt;


	&lt;p&gt;Have you got plans for a paperback edition of Agile Software Development?&lt;/p&gt;</description>
      <pubDate>Thu, 17 Apr 2008 15:48:08 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:53d171fa-cfea-4826-bbb3-c2e806a169ee</guid>
      <link>http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew#comment-1713</link>
    </item>
    <item>
      <title>"Clean Code.  Whew!" by http://www.grayger.com/wp/</title>
      <description>&lt;p&gt;I am looking forward to the book, especially chapter &amp;#8220;error handling&amp;#8221; and &amp;#8220;concurrency&amp;#8221;. Any sample chapter available?&lt;/p&gt;</description>
      <pubDate>Sun, 13 Apr 2008 22:57:25 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:3f043748-f379-4638-8e21-73ac36a134a5</guid>
      <link>http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew#comment-1712</link>
    </item>
    <item>
      <title>"Clean Code.  Whew!" by flipdoubt</title>
      <description>&lt;p&gt;Looking forward to it.&lt;/p&gt;


	&lt;p&gt;One question that has been nagging me lately: I believe I grok the benefit of the &lt;b&gt;SRP&lt;/b&gt;, but if all your classes are responsible for just one thing, won&amp;#8217;t your software do just one thing? I don&amp;#8217;t mean for that to sound overly simplistic. I&amp;#8217;m more interested in learning where the best place is to bring all these single responsibilities together to deliver real value to the user.&lt;/p&gt;</description>
      <pubDate>Wed, 09 Apr 2008 08:17:28 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:e868bd2b-91cd-4963-ba05-44a14b71f7f5</guid>
      <link>http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew#comment-1703</link>
    </item>
    <item>
      <title>"Clean Code.  Whew!" by Dave Hoover</title>
      <description>&lt;p&gt;Great to hear that this book is coming soon!  I am excited to read it and share it with my team.&lt;/p&gt;</description>
      <pubDate>Wed, 09 Apr 2008 06:31:11 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:93cd197c-799d-492a-b8e7-f378229bd528</guid>
      <link>http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew#comment-1701</link>
    </item>
    <item>
      <title>"Clean Code.  Whew!" by Stephen Seymour</title>
      <description>&lt;p&gt;Thank you very much, Dr. Martin. I feel indebted to you for writing &amp;#8220;Agile Software Development&amp;#8221; because it truly helped further my understanding of software development. I suppose I did the work on my end by reading it and digesting it, but your book has had a ripple effect of helping my entire family by putting me in a position to do well in our industry.&lt;/p&gt;


	&lt;p&gt;Thank you, sincerely, once again.  I will certainly buy and read your new book. It&amp;#8217;s an investment only the foolish wouldn&amp;#8217;t make.&lt;/p&gt;</description>
      <pubDate>Tue, 08 Apr 2008 07:15:33 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:593253b2-5c43-461f-a3bb-9641f95f1679</guid>
      <link>http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew#comment-1698</link>
    </item>
    <item>
      <title>"Clean Code.  Whew!" by Philip Schwarz</title>
      <description>Any idea of when it will hit the shelves in the UK? When will it be pre-orderable on Amazon UK?  Thanks. An impatient reader. Your previous book, &amp;#8216;Agile Software Development &amp;#8211; Principles, Patterns, and Practices&amp;#8217; is, in my humble opinion, one of the best development books (there are Kent Beck&amp;#8217;s books as well) I have ever come across. Pure quality. It is a &amp;#8216;must read&amp;#8217;.</description>
      <pubDate>Tue, 08 Apr 2008 02:59:38 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:b1b0cc0e-d426-4402-8492-0bda281b6044</guid>
      <link>http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew#comment-1696</link>
    </item>
    <item>
      <title>"Clean Code.  Whew!" by Paddy Healey</title>
      <description>&lt;p&gt;Congratulations getting this done Bob. I saw you give the Clean Code &amp;#8211; Args talk at Agile 2006 and you were gathering feedback about whether there was a book in this subject. The result from the room seemed to be an overwhelming &amp;#8220;yes!&amp;#8221; and I&amp;#8217;ve been eagerly awaiting the book ever since. The Table of Contents makes it look like this will be worth the wait. It will be on my shelf the day it comes out.&lt;/p&gt;</description>
      <pubDate>Tue, 08 Apr 2008 01:11:55 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:c6d70d69-0634-466e-ac75-ac4d3cca89b6</guid>
      <link>http://blog.objectmentor.com/articles/2008/04/08/clean-code-whew#comment-1695</link>
    </item>
  </channel>
</rss>
