Best practices for coding with feature flags

LaunchDarkly
By Yoz Grahame   •   October 28, 2020
LaunchDarkly

Code is a fragile, temperamental material. Engineers don’t just need a program to function correctly; it should also be easy to read and easy to change. These requirements often conflict with each other, and those conflicts cause much of the difficulty inherent in software engineering.

LaunchDarkly’s core message is that feature flags significantly reduce the risk and pain of working with code. But that reduction doesn’t happen automatically. If used incorrectly, flags may add complexity and fragility to your codebase.

To help developers use flags more effectively, we’ve written a short best practice guide: Improving flag usage in code. It features tips for:

  • designing component interfaces for flag-evaluating code
  • easier flag removal with fewer merge conflicts
  • defending against consistency problems

The Guides section of our Documentation site is a growing collection of best practices from our Developer Advocates. It includes recommendations for creating flagsdeployment and release strategies, and reducing technical debt. There are also tutorials that will walk you through different uses of LaunchDarkly, such as targeting and experimentation.

We’re constantly updating and expanding our Guides. If you’re looking for the best way to use LaunchDarkly in your app, check them out.

You May Like
  •   BEST PRACTICESTesting in Production to Stay Safe and Sensible
  •   BEST PRACTICESWhat Is Continuous Testing? A Straightforward Introduction
MAY 6, 2021   •   BEST PRACTICESRelease Testing Explained
MAY 4, 2021   •   BEST PRACTICESOrchestration vs. Automation in the Cloud: How to Use Both
APRIL 29, 2021   •   POPULAR1-800-FLOWERS.COM, Inc. Migrates to the Cloud Seamlessly with LaunchDarkly
APRIL 28, 2021   •   BEST PRACTICESWhat Is Container Orchestration, Exactly? Everything to Know