Ok, so you can read guidelines on identifier naming 'til you're blue in the face... camel case, pascal case, make 'em descriptive... but they won't help you actually pick the best name for a given application domain.
The easiest to choose (IMHO) are one or two word noun groups:
- EntryForm
- Employee
- WidgetCollection
But not every class fits neatly into a noun so I see a lot of people turn verbs into nouns by adding -er to the end of them:
- AccountManager
- RecordCounter
- ProcessRunner
The biggest problem I see with these is that a lot of time they're ambiguous... especially Manager. What exactly is it managing?
So my question is how do you pick a good name for a class? By 'good' I mean informative and unambiguous.
I know, I know. With refactoring support built into pretty much every modern IDE you can change the name without batting an eye so what's the point? Well a poorly chosen name will confuse and mislead anyone who stumbles across it until it's renamed so its still a valid question.
Picking terse, informative, appropriate names for things is one of the hardest parts of programming.
There is no formula for it. It's a skill you pick up with experience.
Notice the emphasis on terse. The long names in Java is one of the major turnoffs of that language. It basically has gotten to the point that it's impossible to program in Java without an IDE with autocomplete.
Abbreviations can be your friend when naming. For instance, 'Mgr' instead of 'Manager'. Do I really need to type out 'Manager' a thousand times a day when 'Mgr' gets the point across? Just make sure people use them consistently and judiciously.
Clean Code is a good book but don't follow the advice on identifier names and comments. (See Self Describing Code and Long Identifiers Make Code Unreadable )
For example, here is Uncle Bob's bowling example (see other replies for Uncle Bob's code) done properly:
Like kekoav, I am wary of naming something FooManager or FooController. Not only is it indicative of an object that suffers from an identity crisis, but it introduces ambiguity. I've worked on a project where there was an "AccountManager", which was a domain object representing a person who managed accounts (a subtype of Employee). Of course, someone made an "AccountManagerManager", and someone else got confused and created an Account domain object (which wasn't something our app was dealing with), then mixed stuff into AccountManager to manage the Account. It was kind of a mess.
Quis custodiet ipsos custodes? Quoque quis administro ipsos administratorum?
Yeah, my Latin is rusty.
I've been reading Clean Code by Robert C. Martin and hadn't made it to this section from chapter 17 yet but I think it gets the closest to answering the question.
If you're in a .NET environment, you can use FxCop for guidelines. As far as naming a class, I usually will go with noun/purpose. You're exactly right, what does the Manager class do? If it's a controller class, call it ManagerController.
A good point is to use design patterns and you'll have all done :)