I Shall Call It.. SomethingManager

K. Scott Allen has an excellent roundup post with other entries on naming:
http://odetocode.com/Blogs/scott/archive/2007/12/09/11600.aspx

Ottinger’s Rules for Variable and Class Naming:
http://www.objectmentor.com/resources/articles/naming.htm

Naming Classes - Do It Once and Do It Right:
http://www.hacknot.info/hacknot/action/showEntry?eid=48

Use class with semantics in mind:
http://www.w3.org/QA/Tips/goodclassnames

Naming standards for unit tests:
http://weblogs.asp.net/rosherove/archive/2005/04/03/TestNamingStandards.aspx

I think that there are many cases where manager should not be used, but there are many, many more cases where it fits right. For example, think of plug-ins.

What should happen with plug-ins? They should be loaded, executed, queried, and unloaded. So for the definition of manage (one to handle, direct, govern, or control in action or use), the word manager fits perfectly; the class would control the plug-ins.

CPluginManager is a nicer looking name than CPluginController, and they both imply the same meaning. Also, the querying part adds more than just controlling, so CPluginController is misleading.

@theY4Kman

That’s because controller is even more ambiguous than manager. How about cPluginLoader?

Ah, the good old posts where there were fewer comments.

If you ever find yourself writing OutputUser1() and OutputUser2(), God help you. And God help the team you work with.

Yes, I agree with some exclusions. Cocoa has assertions named like that NSAssert1, NSAssert2… NSAssert5 (#defined for programmers convenience), each suffix indicating the variable number of arguments it takes. :slight_smile:

Jeff, Alan’s Green blog link is broken. The correct link is
http://www.bright-green.com/blog/2003_02_25/naming_java_classes_without_a.html

Another good post about choosing good names: http://blogs.msdn.com/ericlippert/archive/2009/04/06/good-names.aspx

I’ll throw my post on naming things into the ring as well. http://benlakey.com/2013/07/20/why-naming-is-critical/

A quick look at the dictionary entry for “manager” and “manage” gives at least ten different meanings - from “to make and keep compliant” through to “to achieve one’s purpose”. […]
This imprecision makes Manager a bad word to use in naming classes.

Better come up with a new name for Set, then!

I know this is a pretty old thread but the concept of ‘SomethingManager’ has gripped me for years since I first encountered the concept and I’ve been mulling it over ever since. To me it seems that the business of software is a multi-level occupation that involves essentially three layers.

We’re not only in the business of creating software, we’re in the business of creating processes to create software and to that end we’re in the business of creating organizations which create processes to create software.

It’s pretty well known according to Conway’s Principle that organizations that design systems (i.e. processes or software) will essentially design systems that mirror the communication patterns within the organization and which reflect the quality of communications within the system. This type of self-similarity cannot be avoided, especially long-term and at scale.

If the *Manager pattern is an anti-pattern at the software level, my instinct tells me it’s also an anti-pattern at the org level and these people who are going around managing the rest of us are pretty much designed to enforce compliance and whatever vacuous purpose the manager class serves.

I feel we ought to extrapolate from the code that if the SomethingManager doesn’t serve in the code it also doesn’t serve in the culture.

2 Likes