views:

89

answers:

5

What is a good strategy for dealing with changing product and feature names in source code. Here's the situation I find myself in over and over again (most of you can relate?)...

  1. Product name starts off as "DaBomb"
  2. Major features are "Exploder", "Lantern" and "Flag".
  3. Time passes, and the Feature names are changed to "Boom", "Lighthouse" and "MarkMan"
  4. Time passes, and the product name changes to "DaChronic"
  5. ...
  6. ...
  7. Blah, blah, blah...over and over and over

And now we have a large code base with 50 different names sprinkled around the directory tree and source files, most of which are obsolete. Only the veterans remember what each name means, the full etimologic history, etc.

What is the solution to this mess?

Clarification: I don't mean the names that customers see, I mean the names of directories, source files, classes, variables, etc. that the developers see where the changing product and feature names get woven into.

A: 

How do you deal with Localization? Same thing; same method.

jeffamaphone
To clarify, I don't mean the names that customers see, I mean the names of directories, source files, classes, variables, etc. that the developers see.
RichAmberale
Ah, in that case, you just live with it. I think that's pretty much standard practice.
jeffamaphone
+4  A: 

I consider renaming to better naming conventions just another form of refactoring. Create a branch, perform the renames, run unit/integration tests, commit, merge, repeat. It's all about process control to keep consistency in the project.

Agent_9191
+5  A: 

Given your clarification that you "don't mean the names that customers see, [you] mean the names of directories, source files, classes, variables, etc. that the developers see", yeah, this can be an annoying problem.

The way teams I've been on have coped with best when we've had a policy of always using only one name for each thing in the code base. If the name changes later on we either stay with the old name in the code, or we migrate all instances of the old name to the new name. The important thing is to never start using the new name in the code unless all instance of the old name have been migrated. That way you only ever have to keep 2 names for something in your head: the "old name", used in the code, and the name everyone else uses.

We've also often chosen a very generic/descriptive name for things when starting out if we know the "brand name" is likely to change.

Laurence Gonsalves
A: 

We use an internal and and external name. It could be as simple as a static variable definition like

public static final String EXPLODER = "Boom";

And in code you'll always use the reference to EXPLODER. Same for path names and the like - hard coding those paths at different places is a no-go anyway. If some guys starts digging through internal stuff (like JS sources or ini files or whatever), who cares if they discover Exploder?

sfussenegger
+3  A: 

The solution to the mess is to not create it in the first place. Once a code path is named, there's rarely a good reason to change it and never a good reason to use a new name alongside the old one. When "Exploder" becomes "Boom", you have two choices: Either keep using Exploder exclusively, and never mention Boom anywhere, or change all instances of Exploder to Boom and then continue on using Boom exclusively and never mention Exploder again.

If you're using both Exploder and Boom in the same code base, you're doing it wrong.

Also, I know you clarified that you're not talking about the user-visible names, but, if you start out working with your own internal names which are relevant to what the code does and completely independent of what marketing wants to call the product/feature, then this is much less likely to become an issue. If you're already referring to Exploder internally as TNT, then what difference does it make if Exploder gets changed to Boom?

Dave Sherohman