I actually have no answer, but three things that you think about.
- The late Phil Carleton famously said: “There are only two difficult problems in computer science:“ Lack of cache and naming. ”Thus, the fact that you are having problems with good names is absolutely normal and even expected.
- OTOH, having problems with naming things, can also be a sign of poor design. (And yes, I understand very well that No. 1 and No. 2 contradict each other. Or maybe you need to think that this is more like balancing each other.) For example, if a thing has too many responsibilities, with a good name. (See all the Service, Utilities, Model, and Manager classes in poor OO constructs. Here’s an example of Google Code Search for “ManagerFactoryFactory . ” )
- In addition, your names should appear in subject jargon used by subject experts. If you cannot find an expert in the subject, this is a sign that you are now worried about code that you should not worry about. (In principle, the code that implements your main business domain should be implemented and well designed, the code in the additional domains should be implemented and designed so-so, and all other code should not be implemented or developed at all, but bought from a vendor where what you buy is their main business domain. [Please interpret “buy” and “provider” liberally. Free software developed for the community is just great.])
As for No. 3 above, you mentioned in another comment that you are currently working on implementing a tree data structure. If your company does not sell tree-like data structures, this is not part of your primary domain. And the reason you have trouble finding good names may be because you are working outside your primary domain. Now, “selling data tree structures” may seem silly, but there are companies that do it. For example, the BCL team is inside the Microsoft developer unit: they actually sell (well, for certain definitions of "sell", anyway) the .NET Framework base class libraries, which include, among other things, tree-like data structures. But note that, for example, the Microsoft C ++ compiler team actually (literally) buys its STL from a third-party provider - they believe that their main domain is written by compilers, and they leave the libraries of the company that believes that the STL files to be written use their main domain, (And indeed, AFAIK, this company does nothing but write and sell STL implementations. This is their only product.)
If, however, selling tree-like data structures is your primary domain, then the names you provided are just fine. These are the names that subject matter experts (programmers, in this case) use when talking about a domain of tree-like data structures.
Jörg W Mittag
source share