A Feature Flag Is a Debt You Take On Deliberately
The flag buys a safe release and costs a branch nobody removes, and the cost compounds because the code keeps both paths alive forever, and the forever is…
The flag behaved. The flag behaved. The chain between them is where working as designed stopped meaning working.
This is the thesis: a feature flag is a debt taken on deliberately, and the debt is the second code path, and the second path is the permanent unless someone removes it, and the removal is the work nobody scheduled, so the flag is the debt that compounds.
This is an opinion, and the flag is genuinely the right tool in several cases, and the rule of thumb at the end is where I land.
What the flag buys
The flag is the decoupling, and the decoupling is the deploy from the release, and the release is the decision, and the decision is the later, and the later is the safe, and the safe is the rollback without the deploy, and the rollback is the seconds, and the seconds is the win, and the win is the real, and the real is the flag's value.
The flag is the gradual rollout, and the gradual is the percentage, and the percentage is the blast radius, and the radius is the small, and the small is the learning, and the learning is the metrics, and the metrics is the decision, and the decision is the expand or the revert, and the two are the flag's power, and the power is the legitimate.
The flag is the trunk-based development's enabler, and the enabler is the incomplete feature's merge, and the merge is the branch's absence, and the absence is the conflict's reduction, and the reduction is the velocity, and the velocity is the win, and the win is the real, and the real is the reason the flag exists.
What the flag costs
The cost is the branch, and the branch is the if, and the if is the two paths, and the two paths is the both tested, and the both tested is the matrix, and the matrix is the doubled, and the doubled is the effort, and the effort is the permanent, and the permanent is the compounding, and the compounding is the every new feature's interaction with the flag.
The cost is the reading, and the reading is the which path, and the which is the uncertainty, and the uncertainty is the debugging's cost, and the cost is the production's state, and the state is the flag's value, and the value is the not in the code, and the not in the code is the confusion, and the confusion is the incident's duration.
The cost is the removal, and the removal is the scheduled nobody, and the nobody is the forever, and the forever is the ten flags, and the ten flags is the thousand combinations, and the thousand is the untestable, and the untestable is the incident, and the incident is the debt's maturity, and the maturity is the rewrite's temptation.
This is the same compounding as the rewrite that is a decision rather than a feeling, and the common root is the property, not the platform.
Where the flag earns its cost
The flag earns it when the removal is scheduled, and the scheduled is the ticket, and the ticket is the date, and the date is the accountability, and the accountability is the removal, and the removal is the debt's repayment, and the repayment is the discipline.
The flag earns it when the rollout is the short, and the short is the days, and the days is the temporary, and the temporary is the removal's near, and the near is the cheap, and the cheap is the justified, and the justified is the flag.
The flag earns it when the kill switch is the purpose, and the purpose is the operational, and the operational is the permanent by design, and the design is the documented, and the documented is the not the debt, because the flag is the feature rather than the scaffolding, and the feature is the keep.
The flag does not earn it when it is the launch's leftover, and the leftover is the abandoned, and the abandoned is the forever, and the forever is the debt, and the debt is the compounding, and the compounding is the incident.
The working rule
The flag is the debt and the debt should have the repayment date, and the date should be the ticket created at the same time as the flag, and the ticket is the removal, and the removal is the discipline that keeps the flag a tool rather than a liability.
Create the removal ticket with the flag. The ticket is the date, and the date is the accountability, and the accountability is the fix, and the fix is the one step, and the step is the discipline, because the flag without the removal ticket is the permanent branch.
Classify the flag as the release or the operational. The release is the temporary, and the temporary is the removal, and the operational is the permanent, and the permanent is the documented, and the documented is the distinction, and the distinction is the fix, because the unclassified flag is the never removed.
Cap the live release flags. The cap is the pressure, and the pressure is the removal, and the removal is the fix, and the fix is the number, and the number is the team's, and the team's is the discipline, because the uncapped flags are the untestable combinations.
Test the flag's both paths while it is live. The both is the matrix, and the matrix is the cost, and the cost is the honest, and the honest is the decision, and the decision is the flag's price, and the price is the fix, because the untested second path is the incident's home.
Log the flag's value with the request. The value is the diagnosis, and the diagnosis is the incident's speed, and the speed is the fix, and the fix is the field, and the field is the discipline, because the behaviour that depends on an invisible setting is the undebuggable.
Where I land
The feature flag is the right tool for the gradual rollout and the kill switch, and the wrong default for the incomplete feature nobody intends to finish. The flag is a debt, and the debt is fine when it has a repayment date, and the date is the one thing almost nobody writes down.
The flag shipped the feature safely and stayed in the code for two years, and the second path was tested by nobody and read by everyone. The lesson I keep is the property, not the incident.
Related reading: The Runbook Nobody Reads at Three in the Morning explores a connected angle.
Related reading: The Standup Is a Status Report and Everyone Knows It explores a connected angle.
Published on debugly.dev by Rohit Bhadani | Founder of Krova Cloud