<?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: Curly's Guide To Software</title>
    <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Curly's Guide To Software</title>
      <description>&lt;p&gt;In the movie City Slickers, weathered cowboy Curly told the clueless ranch noobs that he&amp;#8217;d found the secret of life.  He held up his index finger, and announced &amp;#8220;One Thing.&amp;#8221;&lt;/p&gt;


	&lt;p&gt;I suspect that Curly had a mighty good idea, that you should be able to do one thing supremely well instead of doing and being all things.  For all our units of software, One is a very friendly number, indeed.&lt;/p&gt;


&lt;p&gt;First we look at lines of code.  A line of code has &lt;span class="caps"&gt;ONE&lt;/span&gt; statement on it.  That doesn&amp;#8217;t mean that I can&amp;#8217;t write&lt;blockquote&gt;&lt;tt&gt;if x: do y&lt;/tt&gt;&lt;/blockquote&gt; as a single line.  That&amp;#8217;s one-thing-y enough if the Y and the X are simple.&lt;/p&gt;
&lt;p&gt;Secondly, a statement has one effect. I don&amp;#8217;t have a single expression that increments counters and assigns values.  Software in the old style of C such as&lt;blockquote&gt;*dest++ = *src++;&lt;/blockquote&gt; doesn&amp;#8217;t get much play in my world.  Avoiding side-effects is pretty widely regarded as a good idea, and I think no less so in individual statements.  I will make exception for the &lt;tt&gt;for&lt;/tt&gt;statement, which is a special case. I always avoid the&lt;tt&gt; for&lt;/tt&gt; loop when an iterator loop such as a &lt;tt&gt;for each&lt;/tt&gt; is available.&lt;/p&gt;
&lt;p&gt;Next we move to functions.  I am increasingly fond of Meyers&amp;#8217; &lt;em&gt;Query/Command Separation&lt;/em&gt; principle, and of course the python philosophy that a function should either do something or tell you something. I find that the focus on clear naming for functions helps me here, because a function whose name begs for an &amp;#8220;and&amp;#8221; is an ill-conceived function.  
Whether it&amp;#8217;s a static or a member function or whatever, it needs to do &lt;span class="caps"&gt;ONE&lt;/span&gt; thing.&lt;/p&gt;
&lt;p&gt;Then we move to classes. We have expounded on the Single Responsibility Principle and class normalization enough that I don&amp;#8217;t need to flog that horse here, but you know what I&amp;#8217;m talking about.  A class that has multiple purposes or knows too much is a class that will cause problems.  It is unfocused, and unstable (in that Positional Stability sense).  It&amp;#8217;s trouble.  Better to do one thing very well.&lt;/p&gt;
&lt;p&gt;Packages can easily accrue more features than they should have.  We have our various principles of package dependency management to ensure that a package doesn&amp;#8217;t know too much or do too much.  Again, each should have focus. One is important.&lt;/p&gt;
&lt;p&gt;Finally, through my life (mostly in Unixen, including Linux) I have learned the value of programs that do only one thing (perhaps with a variety of parameters and tools).  I don&amp;#8217;t like them to be both a floor wax and a dessert topping. When an application does one thing, and then starts to accrue features that really are different, I generally find great dissatisfaction.  I don&amp;#8217;t edit html in word or openoffice.  I don&amp;#8217;t use my word processor to create spreadsheets, and I don&amp;#8217; t do my programming in my email system. That seems more obvious than it really is sometimes, but it is yet another application of One Thing.&lt;/p&gt;</description>
      <pubDate>Wed, 10 Jan 2007 11:01:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:5f794157-cea3-4fd5-a1bf-b390625ff543</guid>
      <author>tottinger</author>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software</link>
      <category>Tim's Tepid Torrent</category>
    </item>
    <item>
      <title>"Curly's Guide To Software" by teva sandal</title>
      <description>&lt;p&gt;Women have a lot of power when it comes to their choice on rather to &lt;a href="http://www.toryburch-boutiqueonline.com/sandals_c4" rel="nofollow"&gt;teva sandal&lt;/a&gt; have a child. That is not just power over your own body but power &lt;a href="http://www.toryburch-boutiqueonline.com/handbags_c8" rel="nofollow"&gt;Tory Burch carson satchel&lt;/a&gt; over his pocketbook and his future. I understand that women should &lt;a href="http://www.toryburch-boutiqueonline.com/" rel="nofollow"&gt;Tory Burch&lt;/a&gt; have the right to decide what to do with their own bodies. God gave everyone the right of choice.&lt;/p&gt;</description>
      <pubDate>Wed, 02 May 2012 03:29:57 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:a1ca87c9-10c5-4d27-a1df-5c65ffbf4ef1</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-221136</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by cylinder piston rod</title>
      <description>&lt;p&gt;Get the &lt;a href="http://www.cnquansheng.com" rel="nofollow"&gt;cylinder bore&lt;/a&gt; in 5 minutes! We have gone all out to lower price for you guys, remaining competitive amid the robust market both at home and abroad. That is why cheapest &lt;a href="http://www.cnquansheng.com" rel="nofollow"&gt;aluminum cylinder&lt;/a&gt; with instant delivery and safe &amp;#38; fast air units are available year in and year out.&lt;/p&gt;</description>
      <pubDate>Mon, 05 Dec 2011 03:15:45 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:f51e0a36-687a-4651-9c64-7b3a10569536</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-182156</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;The final sequence &#8212; it is the a single involving hoops that occur to be stacked actually &lt;a href="http://www.hijocund.com/Electric+Skateboard-china-44/" rel="nofollow"&gt;Electric Skateboard&lt;/a&gt; greater &#8212; is wittily accompanied through the projection of an EKG-style pulse line, with accompanying beeps.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 05:01:21 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:979525cf-abee-4f7b-a1ac-da3797b600be</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126827</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;Some on the getting-to-know-you stuff in &#8220;Traces&#8221; is &lt;a href="http://www.hijocund.com/Electric+Scooter-china-47/" rel="nofollow"&gt;Electric Scooter&lt;/a&gt; actually a small twee for my tastes, as well self-consciously charming.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 04:55:53 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:2bc06442-57fd-447d-b8ff-cdc7caddb396</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126821</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;The vocabulary by &lt;a href="http://www.hijocund.com/" rel="nofollow"&gt;Go Kart&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 04:48:12 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:40c79f86-7669-4179-8bcb-bc088d4c406d</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126816</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;In other words, we &lt;a href="http://www.hijocund.com/Mobility+Scooter-china-49/" rel="nofollow"&gt;Mobility Scooter&lt;/a&gt; are meant to think, &#8220;Genius acrobats: they are just like us!&#8221;&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 04:39:20 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:8ca68842-910b-473c-8a2c-7337972605f3</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126815</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;So we discover their &lt;a href="http://www.hijocund.com/" rel="nofollow"&gt;Skateboard&lt;/a&gt; heights, weights, delivery dates and locations of origin, and which they are, variously, flirtatious, humble, romantic, affectionate, easygoing and, in a single self-declared case, clumsy.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 04:38:50 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:eedbc2cf-a7a0-474b-80cb-d2b253293024</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126814</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;Think of it as &lt;a href="http://www.hijocund.com/Electric+Motorbike-china-41/" rel="nofollow"&gt;Electric Motorbike&lt;/a&gt; cirque du cabaret, by which a party of unique talents reach display away the actual equivalents of person music stylings.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 04:37:55 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:3a3acc75-54da-4e33-9f75-d7c87db8a66d</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126812</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;The mandate of seven &lt;a href="http://www.hijocund.com/" rel="nofollow"&gt;Scooter&lt;/a&gt; Fingers, a Montreal group founded in 2002, would be to provide the sort of derring-do connected with extremely circuses decrease to road level, in which earthbound lugs like you and me can recognize with, and also reach know, the individuals who fly via the oxygen using the finest of ease.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 04:31:02 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:a9fe0aa7-feea-40d8-8a7e-44867adad4a3</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126809</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;Except envision that &lt;a href="http://www.hijocund.com/Golf+Cart-china-48/" rel="nofollow"&gt;Golf Cart&lt;/a&gt; impact magnified and poeticized, with urban chaos turned rhythmic and graceful.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 04:28:06 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:baf5fb6a-2f65-41d6-8fd3-3a38d6d0f8f8</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126807</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;Or 7 dealers, to become &lt;a href="http://www.hijocund.com/Electric+Bike+Conversion+Kits-china-50/" rel="nofollow"&gt;Electric Bike Conversion Kits&lt;/a&gt; precise, recognised to their buyers as Les seven Doigts de la primary (or seven Fingers).&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 04:27:40 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:023d2e82-53e4-4a9c-92a2-7d84845ef1b1</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126806</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;Given the character on the PlayStation professional instant Award the brand new nominees could possibly be any among the &lt;a href="http://www.hijocund.com/Electric+Skateboard-china-44/" rel="nofollow"&gt;Electric Skateboard&lt;/a&gt; talented skaters anticipated to compete in Portland. Skate fans have to be aware that voting for your Dew Tour Portland Invitational nominees is slated to commence on August 22nd and operate via September 11th.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 04:26:56 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:c3bdc5f2-1300-4e8c-b0d7-413e9326d8ce</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126804</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;The choice on who will succeed the PlayStation professional instant Award &lt;a href="http://www.hijocund.com/Electric+Scooter-china-47/" rel="nofollow"&gt;Electric Scooter&lt;/a&gt; for your Pantech available end at this stage is previously in your arms on the fans.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 04:26:24 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:c71887f0-ea18-4b90-b737-10deebe341c1</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126803</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;In purchase to obtain the &lt;a href="http://www.hijocund.com/" rel="nofollow"&gt;Go Kart&lt;/a&gt; PlayStation professional instant on the 12 months Award all PlayStation professional instant nominees through the primary 3 Dew Tour stops are heading to be granted a single final possibility in the Dew Tour Championships in Las Vegas to impress a panel of judges.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 04:24:48 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:1a758588-0ef6-4462-8a42-85968bb50a6b</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126800</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;Both skateboarders and BMX riders are &lt;a href="http://www.hijocund.com/" rel="nofollow"&gt;Skateboard&lt;/a&gt; eligible for your award.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 04:24:14 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:fbb3a7af-b82a-4061-b829-c2dee6abae1f</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126799</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by hi good luck </title>
      <description>&lt;p&gt;In purchase to become &lt;a href="http://www.hijocund.com/" rel="nofollow"&gt;Scooter&lt;/a&gt; nominated for any PlayStation professional instant Award an athlete should execute a perfect, jaw dropping trick throughout a 2011 Dew Tour stop.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Aug 2011 04:23:34 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:7b16fb04-239b-452a-88fd-bc149fbab993</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-126798</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by okey oyunu oyna </title>
      <description>&lt;p&gt;thanks a lot my friend &amp;#8230; &lt;a href="http://www.okeyoyunu-oyna.com" rel="nofollow"&gt;Okey Oyunu Oyna&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 22 Apr 2011 07:16:13 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d8de88e6-cb9e-4903-8850-e45fe3e58092</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-89561</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by Robert Schlee</title>
      <description>&lt;p&gt;Truly good post, I&amp;#8217;ve been planning to study a thing of this nature as well as your writing has match the bill flawlessly, many thanks very much certainly.&lt;/p&gt;</description>
      <pubDate>Tue, 19 Apr 2011 04:58:55 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:fe9e2732-1c2e-4c10-95df-b8728bf30207</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-87188</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by jeans sale&lt;/</title>
      <description>&lt;p&gt;&lt;a href="http://www.newjeansale.com" rel="nofollow"&gt;&lt;strong&gt;jeans sale&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.newjeansale.com" rel="nofollow"&gt;&lt;strong&gt;religion jeans&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 15 Apr 2011 03:08:38 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:12002ccd-9929-436e-8fd7-08727c58f8cd</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-85450</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by Earphones</title>
      <description>&lt;p&gt;&lt;a href="http://cheap-cigarettessale.com" rel="nofollow"&gt;&lt;strong&gt;newports for cheap&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://cheap-cigarettessale.com" rel="nofollow"&gt;&lt;strong&gt;cheap newports online&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 14 Apr 2011 21:25:04 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:1346c4ff-2eaa-4c9a-8b1e-fcbbec4942de</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-85180</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by seo corporation</title>
      <description>&lt;p&gt;I do not agree with your very statement that &amp;#8220;A class that has multiple purposes or knows too much is a class that will cause problems. It is unfocused&amp;#8221;. as knowledge is power and if a leader can guide the class it can perform geat jobs.
Yet, I find your post interesting. Thanks a lot.&lt;/p&gt;</description>
      <pubDate>Sat, 19 Mar 2011 02:52:24 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:3954aae4-415b-4699-a9b4-b975c7677d0d</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-73867</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by Tenant Screening</title>
      <description>&lt;p&gt;A class that has multiple purposes or knows too much is a class that will cause problems. It is unfocused, and unstable (in that Positional Stability sense). It&#8217;s trouble. Better to do one thing very well.&lt;/p&gt;</description>
      <pubDate>Wed, 23 Feb 2011 09:46:15 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:7f08a5d3-bb48-4310-af98-e2ba35b8335d</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-66176</link>
    </item>
    <item>
      <title>"Curly's Guide To Software" by Criminal Records</title>
      <description>&lt;p&gt;A class that has multiple purposes or knows too much is a class that will cause problems. It is unfocused, and unstable (in that Positional Stability sense). It&#8217;s trouble. Better to do one thing very well.&lt;/p&gt;</description>
      <pubDate>Mon, 21 Feb 2011 14:47:06 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:de2449c8-7d98-4fcf-b3ec-62fa0fcdf218</guid>
      <link>http://blog.objectmentor.com/articles/2007/01/10/curlys-guide-to-software#comment-65275</link>
    </item>
  </channel>
</rss>

