4 ms·
The biggest three tips I'd offer for feature flags are: 1. Don't use a feature flag unless you absolutely have no other choice. 2. If you must use a feature f
by ubertaco 11y ago
The biggest three tips I'd offer for feature flags are:
1. Don't use a feature flag unless you absolutely have no other choice.
2. If you must use a feature flag, ensure that it's short-lived. (A/B testing, migration paths, etc).
3. If you must use a feature flag, ensure that everyone knows about it. I've found a "sticky of shame" in a highly-visible place helps limit its spread.
Feature flags are, by nature, tools to at least double your app's cyclomatic complexity with each one and make deterministic testing/debugging/bug-repro that much harder.
Feature flags are the most dead-on application of the old "a developer had a problem....now he has two problems" joke that I've ever come across: a developer had a problem with an existing codepath, so he thought "I'll add a feature flag". Now he has N problems, where N is the number of possible states of the feature flag.