---
date: "2023-11-24"
keywords: ["economics", "feature flags"]
title: "Economics of Feature Flags"
id: "urn:uuid:7f242a34-e137-11ed-82a5-04ed33d3e45b"
abstract: |
Feature flags are a technique for decreasing the cost and risk of changes in software in exchange for a larger up-front investment in development time. As an investment strategy, and not a programming technique, they are best understood in terms of economics.
---
## Introduction
"Feature flags" (also called "feature toggles") are a popular technique for mitigating some of the downsides associated with changing code.
Technically, feature flags are input parameters like any other, in that they are a way to influence a program's behavior without necessarily changing the program. However, unlike parameters intended for end-users, feature flags are typically created for the benefit of developers or operators of software.
The treatments of feature flags I've seen either:
1. Revolve around particular use-cases, such as deployment, feature management, or refactoring.
1. Focus on implementation detail, such as particular config file or database management conventions and techniques.
What these treatments seem to all miss is a precise enumeration of the tradeoffs inherent in the idea, that's applicable to every context in which feature flags are employed, and material to any implementation. That set of tradeoffs, which we will now explore, is given by one universal invariant: scarcity.
## Scarcity