Hacker News new | ask | show | jobs
by ozten 3688 days ago
In my experience with large codebases and multiple teams, another developer might copy that flag into another part of the code to get some desired side-effect.

Yes, this is horrible, but in the real world...

I find you have to grep through the code and think about all the changes that impact your feature flag before systematically removing it. You're cleanup branch isn't being maintained and is could provide a false sense of safety.

1 comments

You are right that the real world is always more complicated. However, I think the idea holds. If another dev needs to use the flag in another area of code, the flag cleanup branch should be maintained with this change.

The point is not to make flag cleanup automatic. It is to front-load the work of cleaning it up when the complexities involved are fresh in your mind. That way, when it comes time to clean it up, it is much easier to be more confident that you found all of the edge cases.