Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>My guess is the book makes this point because it's trying to encourage you to choose a <em>more descriptive</em> name for your class. There's no "naming convention" to follow here; that's the problem you fell into in the first place. Any universal naming convention won't be able to consider the specific class and choose the best name for it. Expressivity is more important than following a naming convention. Calling a class a "Manager" or a "Processor" doesn't say very much about it and what it does to a person who is reading your code for the first time.</p> <p>If you really can't think of anything better, there's nothing inherently wrong with naming a class <code>ConnectionManager</code>. But I'd at least name it after the <em>type</em> of collections that it manages. Or maybe <em>how</em> it manages those collections. Or <em>why</em> it manages those collections.</p> <p>Also consider that following "one-size-fits-all" rules rarely helped anyone to write better code (at least, not better in the sense of "more understandable" or "more expressive). I tend to postfix the names of all my native wrapper classes with <code>Manager</code>. For example, I might have classes called <code>DwmManager</code>, or <code>VisualStylesManager</code>. In that very specific case, it <em>does</em> mean something to me. If I see a class named <code>Manager</code> in my code base, I know it wraps a bunch of closely-related functionality. You have to make the decision on a case-by-case basis, understanding what you're ultimately trying to accomplish.</p> <p>If you read <em>Code Complete</em> and missed the part about writing code that's clear and understandable (and therefore maintainable), you might have missed the point.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload