Pergunta

I'm creating a branch in source control to strip large parts of an application out. Whilst giving this branch a name, I started questioning if "removal" is the right word.

As I'm not specifically just removing the code, I'm also rewriting a few other parts to fit around the new code structure.

I was wondering, is there a synonym for "removal" when talking about code?

I was thinking maybe "refactor", but I'm only about 10-20% of the code change will be refactoring. Most of the changes will be literally stripping code out.

Foi útil?

Solução

The three terms that I would consider would be "obsolescence", "deprecation" or "refactoring".

Obsolescence is when something that works is phased out. Deprecation refers to a process by which the use of something is discouraged. Depending on the delivery and use of a system, both obsolescence and deprecation must be planned and communicated over time.

Refactoring is changes to the internal structure of code. After something is made obsolete or deprecated, it may be removed. The removal may lead to the ability to refactor the code to better structure it based on those changes.

Outras dicas

I think refactor is appropriate here, but I sometimes call this cleanup.

I usually go with the term purge when I need to replace rotten code with fresh functionality.

You can name your branch with any convention you like:

purge-your-feature

or

purge/your-feature

When pushing changes you can use conventional commits to be more semantic about them.

The term I use is Prune. Like pruning a tree. You are intentionally and with thought removing parts / branches of code - whether dead or it’s unwanted for other reasons.

We use the word decommission, such as in "I am decommissioning this obsolete component." or "Decommissioning of unused code."

Everything is a refactoring so it doesn't tell me anything. Removal of X, cleanup, pruning, retiring, eliminating, throwing out, stripping (away) are much more expressive.

Alternatives may also be (if applicable): merging component X into Y / combining X and Y etc.

However, the branch will be gone once you are done. If you want to spend brain capacity on naming stuff for git, rather spend it on naming commits, they stay forever (more or less).

Licenciado em: CC-BY-SA com atribuição
scroll top