<story><title>One of the Best Bits of Programming Advice I ever Got</title><url>http://objology.blogspot.com/2011/09/one-of-best-bits-of-programming-advice.html?spref=tw</url></story><parent_chain></parent_chain><comment><author>mcherm</author><text>I am unconvinced. Any absolute deserves close scrutiny, and &quot;real nouns only&quot; is an absolute. In this case, it fails my test. I find that many things I work with (especially huge Java libraries) tend to have convoluted and difficult-to-understand webs of classes with the most confusing pieces named things like &quot;FooManager&quot; or &quot;FooController&quot;. So the author of this piece is reacting to a genuine excess.&lt;p&gt;But Travis is overreacting. The REAL goal is to find a collection of abstractions that is powerful enough to accomplish what the program requires but as simple as possible (and as local as possible) to allow humans to comprehend (and maintain) it. There are quite a few times when I have found that one of these &quot;verb-like&quot; abstractions (a word ending in &quot;-er&quot;) made things more comprehensible.&lt;p&gt;For example: the Gang-of-Four patterns &quot;Builder&quot; and &quot;Observer&quot; both end in &quot;-er&quot; and strike me as being well-named. &quot;Builder&quot; is an object with no purpose other than to create (initialize) another object or data structure. HAVING such an object is useful when something requires extensive setup or initialization, because it is easier to understand if the extensive initialization is kept separate from the core functionality. &quot;Observer&quot; is the name for an interface of things that observe... the names of interfaces FREQUENTLY work well as &quot;verbs&quot; since the interface frequently represents &quot;anything that does X&quot;.&lt;p&gt;Similarly, I have often had a class such as &quot;DatabaseConnection&quot; and then created &quot;DatabaseConnectionWrapper&quot; -- a class whose purpose is to wrap a DatabaseConnection to do something like logging, error reporting, pool flushing, driver-bug-patching, and so forth. Suggestions that I call these &quot;LoggingDatabaseConnection&quot;, &quot;ErrorReportingDatabaseConnection&quot; and so forth misses the key point: a different mix of features may be required at different times (eg: logging in QA but not in Prod); the fact that they are transparent wrappers that can be added (or not) in any order is a key feature of the design.&lt;p&gt;So my own advice would be weaker than Travis&apos;. Instead of &quot;Don&apos;t make objects that end with -er.&quot;, I would say &quot;Be wary of confusing objects; those ending in -er are often confusing.&quot;</text></comment>
<story><title>One of the Best Bits of Programming Advice I ever Got</title><url>http://objology.blogspot.com/2011/09/one-of-best-bits-of-programming-advice.html?spref=tw</url></story><parent_chain></parent_chain><comment><author>ctdonath</author><text>Amazing how small linguistic changes can cause large semantic shifts.&lt;p&gt;Comparable to the post&apos;s rule: in English, a few rules I&apos;ve picked up are&lt;p&gt;- avoid words ending in &quot;ly&quot; (suffix weakens concepts; suggestion from Stephen King)&lt;p&gt;- never start a sentence with &quot;I&quot; and otherwise minimize its use&lt;p&gt;- &quot;but&quot; negates everything that came before&lt;p&gt;- avoid &quot;to be&quot;&lt;p&gt;Any other such suggestions, in natural or artificial languages?</text></comment>