There's a good blog post from ThoughtWorks (MartinFowler.com) about feature flags, the different categories, and code examples[0]. The post explores different feature flag implementations and tradeoffs, depending on the longevity and dynamism of the feature flag.