Grammatically correct: ProjectileManager or ProjectilesManager?

Started by
44 comments, last by deathtrap 18 years, 4 months ago
My point was that the word "Manager" can have any number of meanings, as such it doesn't tell you what the class is, nor what it does. "Projectile" very clearly describes what it is. "Manager" is a vague, shoddy class name.

Quote:EDIT: The fact this is a discusion must make english a pretty poor language.

Possibly. More relevantly: The fact that this is a discussion implies "Manager" is a poor name for a class.
:stylin: "Make games, not war.""...if you're doing this to learn then just study a modern C++ compiler's implementation." -snk_kid
Advertisement
Well, yeah, only Manager is a very vague name, but I think you can tell easily what a class named ProjectileManager does, especially in the conext of game programming.
[s]--------------------------------------------------------[/s]chromecode.com - software with source code
Quote:Original post by Enselic
Well, yeah, only Manager is a very vague name, but I think you can tell easily what a class named ProjectileManager does, especially in the conext of game programming.

Apparently not, since you not only started a thread about it, but no less than 25 other posts have debated over it.

If you concede that the word "Manager" is vague, how would qualifying it with "Projectile" make it any more clear? We can deduce that the class "manages" one [or more] projectile; but since we can't clearly define what "manage" means what good does it do?
:stylin: "Make games, not war.""...if you're doing this to learn then just study a modern C++ compiler's implementation." -snk_kid
When did I say I didn't know what a ProjectileManager does?<br><br>All I wanted to know was which &#111;ne of them sound 'good' in the ears of an english man/woman, assuming that &#111;ne of them <i>did</i> sound weird, since ProjectilesManager in swedish sounds insane.<br><br>Apparently none of them sounded weird, so the discussion, logically, turned into a discussion of which &#111;ne of the names that would be <i>logical</i>, which I think most agree ProjectileManager is.
[s]--------------------------------------------------------[/s]chromecode.com - software with source code
Actually, ProjectilesManager does sound weird. All you english speaking folk; just stop and say it. ProjectileManager is much nicer.

It's also reasonably clear what this does, and in response to stylin, I don't think the purpose of the class has been in question very much if at all; just which of the two names would be better.

- Jason Astle-Adams

Enselic, my apologies if I misinterpretted the course of the thread. Simply, ProjectilesManager sounds strange to me, yes. It also sounds as unspecified as ProjectileManager does, IMO.

Kazgoroth, I think the number of objects a class deals with - namely whether that number is 1 or not - plays a large role in the purpose of a class. A class that interacts with one object exclusively is essentially performing a different/lesser function than a class that 'manages' multiple objects - the latter having both greater implied responsibility and scope. I just don't think the two are the same.
:stylin: "Make games, not war.""...if you're doing this to learn then just study a modern C++ compiler's implementation." -snk_kid
Quote:Original post by stylin
Task(s)Manager may be called Kernel,
Cow(s)Manager may be called Cowboy or Cowhand,
Book(s)Manager may be called Librarian, etc.


Ugh, I hate stuff like that, it makes code rediculously hard to follow in my eyes because it encourages a lack of conformity.

Imagine someone doing a sheep sim and having a class called CShepard to store, update, sort and manage all the CSheeps. At first glance, one would assume it was the implementation for a Shepard character in the world, not an internal management class.

This can easily get out of control, and for a new guy on the team it can turn into a game of 'Guess the object' (Remember all the old Sierra parser fun?) as they hunt through a class list looking for something that might resemble what they're looking for.

I used to work with a programmer that did stuff like this, using 'creative' class names here and there. There were many, many times when I heard people yelling out 'What the hell was that class/action called again?'. In short, it didn't add to readability, it just added to the obscurity.
Talk about over-engineering. Just write the damn code!! :-)
Quote:Original post by Enselic
but I think you can tell easily what a class named ProjectileManager does, especially in the conext of game programming.

Nope. How does it manage them? Does it act as a pool and recycle dead instances? Does it keep track of all active instances and handle updating all of them each frame? Does it keep them state sorted and other voodoo ready for rendering? Or does it act as a factory and hand out pre-configured particle systems based on xml/other data.

Classes should be small, simple and have a well defined name and purpose. 'Manager' violates all of these.
Quote:Original post by OrangyTang
Classes should be small, simple and have a well defined name and purpose. 'Manager' violates all of these.


Although if you do that too much you'll just have a goddamned encyclopedia of classes you have to hunt through to get the required functionality.

A manager, to me, is any single object that preforms operations on multiple objects of a given type. It keeps a list of all relevant objects (All textures loaded, all entities in the map, etc) and provides an interface for operations that involve all of those objects (Garbage collection, sorting, finding, deleting, etc).

What's so wrong with that?

This topic is closed to new replies.

Advertisement