There comes a time where every software engineer needs to make the best of a challenging situation. With software creep an all-too-real issue, making sure that you only keep features that benefit your program is indeed important.
Removing unwanted code can also dramatically improve your productivity, preventing you from having to search through massive, mostly-unused files for answers you need.
But how do you decide whether or not you want to keep a feature? After all, even the most loved bits of widely-used software might have to get replaced with a new feature.
Below I'll list a few of the most common reasons I've had to sunset features in some of my projects.
The code behind the feature is buggy/complicated
Sometimes it's as simple as evaluating the code you have and cleaning it up. But sometimes, your code has so many forks and branches, so much cruft from years of development, that you just need to toss it out and code a drop-in replacement. Or throw the feature out entirely.
Causes massive server load
If the feature you're looking at causes massive server load for minimal benefit, and is starting to cause an issue... Why is it still around?
Ask yourself, do your users really need this massive turd slowing down the rest of their experience?
Users don't like or use your feature
Users know best.
... Okay, maybe not always. But if the majority of your userbase dislikes a feature, or almost nobody uses it, it's simply wasting space. Now, there are exceptions.
- Accessibility settings
- Important diagnostic information
- Help files
- & more!
(Non-exhaustive list above)
Users not using a feature is my number one indicator that it's either not easy enough to use, or that it has to go.
Removing or replacing features in your software can be beneficial to your productivity and user experience. Other times it can't be. Deciding when to keep a feature, or when to leave it on the curb, is just as much a part of software engineering as writing the code itself.
While I don't claim to be an expert in programming theory, I hope you choose to make the right decisions.