Release flags are the last thing you should do

WARNING

See Knightmare A DevOps Cautionary Tale on the risk of having dead code in a complex codebase

  • If not kept in check:
    • The codebase becomes more complex as
      • there’s many branches
      • you may not have context on why certain flags exists, or how it interacts with other flags
    • Wasting time on dead code
      • Refactors have to account for dead code1
    • Testing becomes harder and longer due to more feature flags
    • A reason to build code that never gets released
      • This sums to poor planning though
    • A reason to not remove code
  • It’s also a smell since it means that feature development are long running or aren’t completed, that’s why (release) flags are not removed
    • Long running features ofc means that you aren’t making small frequent releases, nor are you getting good feedback from your users
  • Prioritize small releases or Keystone Interfaces over release flags

Footnotes

  1. facing this at time of writing with piglet ↩