Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deal with changing feature and product names in source code?

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.

like image 628
noctonura Avatar asked Oct 06 '09 16:10

noctonura


2 Answers

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.

like image 132
Laurence Gonsalves Avatar answered Nov 15 '22 11:11

Laurence Gonsalves


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.

like image 37
Agent_9191 Avatar answered Nov 15 '22 12:11

Agent_9191