Abstract
Background
Using feature toggles is a technique that allows developers to either turn a feature on or off with a variable in a conditional statement. Feature toggles are increasingly used by software companies to facilitate continuous integration and continuous delivery. However, using feature toggles inappropriately may cause problems which can have a severe impact, such as code complexity, dead code, and system failure. For example, the erroneous repurposing of an old feature toggle caused Knight Capital Group, an American global financial services firm, to go bankrupt due to the implications of the resultant incorrect system behavior.
Aim
The goal of this research project is to aid software practitioners in the use of practices to support software development with feature toggles through an empirical study of feature toggle practice usage by practitioners.
Method
We conducted a qualitative analysis of 99 artifacts from the grey literature and 10 peer-reviewed papers about feature toggles. We conducted a survey of practitioners from 38 companies.
Results
We identified 17 practices in 4 categories: Management practices, Initialization practices, Implementation practices, and Clean-up practices. We observed that all of the survey respondents use a dedicated tool to create and manage feature toggles in their code. Documenting feature toggle’s metadata, setting up the default value for feature toggles, and logging the changes made on feature toggles are also frequently-observed practices.
Conclusions
The feature toggle development practices discovered and enumerated in this work can help practitioners more effectively use feature toggles. This work can enable future mining of code repositories to automatically identify feature toggle practices.
Similar content being viewed by others
Notes
References
Bird J (2014) Feature toggles are one of the worst kinds of technical debt. [Online]. Available: https://dzone.com/articles/feature-toggles-are-one-worst. Accessed 24 April 2019
Dale NB, Weems C, Headington MR (2003) Introduction to java and software design: swing update. Jones & Bartlett Learning, Burlington
Day B (2020) Get good at devops: Feature flag deployments with asp.net, webapi, & javascript. Available: https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio-Live-Redmond-2016/W07. Accessed 27 January 2020
featureflags.io (2020) Feature flags, toggles, controls - cleaning up. Available: http://featureflags.io/feature-flags-cleaning-up/. Accessed 13 January 2020
Feitelson DG, Frachtenberg E, Beck KL (2013) Development and deployment at facebook. IEEE Internet Comput 17(4):8–17
Fowler M (2013) Continuousdelivery. [Online]. Available: https://martinfowler.com/bliki/ContinuousDelivery.html. Accessed 24 April 2019
Fowler M (2010) Feature toggle. [Online]. Available: https://martinfowler.com/bliki/FeatureToggle.html. Accessed 24 April 2019
Garousi V, Felderer M, Mäntylä MV (2016) The need for multivocal literature reviews in software engineering: complementing systematic literature reviews with grey literature. In: Proceedings of the 20th international conference on evaluation and assessment in software engineering, pp 1–6
Garousi V, Felderer M, Mäntylä MV (2019) Guidelines for including grey literature and conducting multivocal literature reviews in software engineering. Inf Softw Technol 106:101–121
Garousi V, Felderer M, Mäntylä MV, Rainer A (2019) Benefitting from the grey literature in software engineering research. arXiv:1911.12038
Google (2019) Chromium flags. Available: https://docs.google.com/spreadsheets/d/1XwGEpBidtPKS_xFzW8bfQ4kbuVe0OuPlpMsSd8wTmmo/edit. Accessed 24 April 2019
Hammarberg M, Sunden J (2014) Kanban in action. Manning Publications Co., Shelter Island
Harmes R (2009) Flipping out. [Online]. Available: http://code.flickr.net/2009/12/02/flipping-out/. Accessed 24 April 2019
Hodges B (2017) Progressive experimentation with feature flags. Available: https://docs.microsoft.com/en-us/azure/devops/learn/devops-at-microsoft/progressive-experimentation-feature-flags. Accessed 24 April 2019
Hodgson P (2017) Feature toggles (aka feature flags). [Online]. Available: https://martinfowler.com/articles/feature-toggles.html. Accessed 24 April 2019
Hodgson P (2018) Lean product development: Managing feature flags at scale. [Online]. Available: https://www.youtube.com/watch?v=uFW4SSRtkUU. Accessed 24 April 2019
Humble J, Farley D (2010) Continuous delivery: reliable software releases through build, test, and deployment automation (Adobe Reader), Pearson Education, Upper Saddle River
Instagram Engineering (2015) Flexible feature control at instagram. Available: https://instagram-engineering.com/flexible-feature-control-at-instagram-a7d3417658df. Accessed 24 April 2019
Kieser G (2017) Removing risk from product launches: a webinar with LaunchDarkly, CircleCI and GoPro. Available: https://circleci.com/blog/removing-risk-from-product-launches-a-webinar-with-launchdarkly-circleci-and-gopro/. Accessed 27 January 2020
Knight Capital Group (2014) Knightmare: A devops cautionary tale. Available: https://dougseven.com/2014/04/17/knightmare-a-devops-cautionary-tale/. Accessed 24 April 2019
Kohavi R, Longbotham R, Sommerfield D, Henne RM (2009) Controlled experiments on the web: survey and practical guide. Data Mining and Knowledge Discovery 18(1):140–181
Launchdarkly (2018) Best practices. Available: https://github.com/launchdarkly/featureflags/blob/master/5%20-%20Best%20Practices.md. Accessed 24 April 2019
Leena SN (2017) Merge hells!! feature toggles to the rescue - pipeline conference 2017. [Online]. Available: https://www.youtube.com/watch?v=R9EYY0Uu250. Accessed 24 April 2019
Lefebvre C, Manheimer E, Glanville J (2008) Searching for studies. Cochrane handbook for systematic reviews of interventions:, Cochrane book series, pp 95–150
Likert R (1932) A technique for the measurement of attitudes. Arch Psychol
Meinicke J, Wong C-P, Vasilescu B, Kaestner C (2020) Exploring differences and commonalities between feature flags and configuration options. In: Proceedings of the 42nd international conference on software engineering - software engineering in practice (ICSE-SEIP)
Meyer M (2014) Using feature flags to ship changes with confidence. [Online]. Available: https://blog.travis-ci.com/2014-03-04-use-feature-flags-to-ship-changes-with-confidence/. Accessed 24 April 2019
Mclaughlin T (2017) Introducing stormcrow. Available: https://blogs.dropbox.com/tech/2017/03/introducing-stormcrow/. Accessed 24 April 2019
Moore GA (2009) Crossing the chasm: Marketing and selling technology project. Harper Collins, New York
Nadel B (2018) Launchdarkly lunch-and-learn panel discussion: New York City. Available: https://www.bennadel.com/blog/3464-launchdarkly-lunch-and-learn-panel-discussion-new-york-city.htm. Accessed 18 June 2019
Nadel B (2018) Using the launchdarkly dashboard and json types to create light-weight application administrative features. Available: https://www.bennadel.com/blog/3465-using-the-launchdarkly-dashboard-and-json-types-to-create-light-weight-application-administrative-features.htm. Accessed 27 January 2020
Neely S, Stolt S (2013) Continuous delivery? easy! just change everything (well, maybe it is not that easy). In: 2013 Agile conference. IEEE, pp 121–128
Østhus I (2017) Continuous deployment: Unleash your features gradually!. Available: http://bytes.schibsted.com/unleash-features-gradually/. Accessed 24 April 2019
Parnin C, Helms E, Atlee C, Boughton H, Ghattas M, Glover A, Holman J, Micco J, Murphy B, Savor T et al (2017) The top 10 adages in continuous deployment. IEEE Software 34(3):86–95
Piessens D (2015) It’s more than feature toggles. Available: https://www.youtube.com/watch?v=TCwMxTuDLwI. Accessed 27 January 2020
Rahman AAU, Helms E, Williams L (2015) Chris Parnin Synthesizing continuous deployment practices used in software development. In: Proceedings IEEE Agile Conference, pp 1–10
Rahman MT, Querel L-P, Rigby PC, Adams B (2016) Feature toggles: practitioner practices and a case study. In: Proceedings of the 13th International conference on mining software repositories. ACM, pp 201–211
Rahman MT, Rigby PC, Shihab E (2018) The modular and feature toggle architectures of google chrome. Empir Softw Eng, 1–28
Roberts J (2019) Featuretoggle in.net. [Online]. Available: http://jason-roberts.github.io/FeatureToggle.Docs/. Accessed 24 April 2019
Rodríguez P, Haghighatkhah A, Lwakatare LE, Teppola S, Suomalainen T, Eskeli J, Karvonen T, Kuvaja P, Verner JM, Oivo M (2017) Continuous deployment of software intensive products and services: A systematic mapping study. J Syst Softw 123:263–291
Rollout (2018) Your feature flag management needs to include retirement [Online]. Available: https://rollout.io/blog/feature-flag-retirement/. Accessed 24 April 2019
Rusovsky E (2017) Feature flag management systems save you from technical debt. Available: https://rollout.io/blog/feature-flag-management-technical-debt/. Accessed 18 June 2019
Saldaña J (2015) The coding manual for qualitative researchers. Sage
Sayagh M, Kerzazi N, Adams B, Petrillo F (2018) Software configuration engineering in practice: Interviews, survey, and systematic literature review. IEEE Trans Softw Eng
Schermann G, Cito J, Leitner P (2018) Continuous experimentation: challenges, implementation techniques, and current research. IEEE Softw 35(2):26–31
Schermann G, Cito Jürgen, Leitner P, Zdun U, Gall HC (2018) We’re doing it live: A multi-method empirical study on continuous experimentation. Inf Softw Technol 99:41–57
Schneid K (2017) Branching strategies for developing new features within the context of continuous delivery. In: CSE@ SE, pp 28–35
Sowa RLE (2010) Feature bits: Enabling flow within and across teams. [Online]. Available: https://www.infoq.com/presentations/Feature-Bits. Accessed 24 April 2019
Split (2019) Audit logs. Available: https://docs.split.io/docs/streaming-audit-logs. Accessed 24 April 2019
Stephens R (2015) Beginning software engineering. Wiley, New York
Tang C, Kooburat T, Venkatachalam P, Chander A, Wen Z, Narayanan A, Dowell P, Karl R (2015) Holistic configuration management at facebook. In: Proceedings of the 25th symposium on operating systems principles, pp 328–343
Tejaswini UL (2019) There is no devops without feature flags! [Online]. Available: https://www.ibm.com/developerworks/community/blogs/c914709e-8097-4537-92ef-8982fc416138/entry/THERE_IS_NO_DEVOPS_WITHOUT_FEATURE_FLAGS?lang=en. Accessed 24 April 2019
Tiwari A (2013) Decoupling deployment and release- feature toggles. [Online]. Available: https://www.abhishek-tiwari.com/decoupling-deployment-and-release-feature-toggles/. Accessed 24 April 2019
Tsvetkov A (2017) Feature toggles in .Net: tips and tricks. Available: https://surfingthecode.com/feature-toggles-in-.net-tips-and-tricks/. Accessed 13 January 2020
Wohlin C (2014) Guidelines for snowballing in systematic literature studies and a replication in software engineering. In: Proceedings of the 18th international conference on evaluation and assessment in software engineering. Citeseer, p 38
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by: Bram Adams
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix
Appendix
The survey questions are as follows:
-
1.
What is your company name?
-
2.
How long has your team used feature toggles?
-
3.
What feature toggle management system is used by your team? (Check all that apply). Options: Closed source custom system maintained by the company; Open source custom system maintained by the company; Third party (e.g. LaunchDarkly), Open source but not maintained by the company; None; Other.
-
4.
For what purpose(s) does your team use feature toggles? (Check all that apply). Options: Support CI of partially-completed features; Dark launches; A/B testing; Gradual rollout; Other.
-
5.
Does your team make decision about using feature toggles for each feature? Options: Yes. The team checks to find if using a feature toggle is necessary for the new feature; No. The feature toggle is always added when a new feature is added; Other.
-
6.
How often does your team do the following management practices? Options: Always, Mostly, About half of the time, Rarely, and Never.
-
Document feature toggle’s metadata (spreadsheet, etc) to manage data about feature toggles. (i.e. the owner of the toggle, the current value (on, off), the current status (to remove, keep) and the time of its creation).
-
Logging changes to toggle values/configurations (e.g. who changes which toggle and when, etc.).
-
Grouping toggles together in any way to simplify management or giving permissions (i.e. related toggles, other).
-
Allowing all team members (i.e. Q&A team) to have access to feature toggles and can make changes.
-
-
7.
How often does your team do the following initialization practices? Options: Always, Mostly, About half of the time, Rarely and Never.
-
Determining the type (permission toggle, ops toggle, release toggle, experiment toggle, short-lived toggle, long-lived toggle) of the toggle at design step. (More information about types of toggles: https://goo.gl/4okG5Y)
-
Using naming conventions for toggles (similar to variable and function naming conventions).
-
Setting up a default value for toggle if toggle value is not found (i.e. toggle is off if its value is not found in the code).
-
-
8.
How are the values of the toggles stored? (Check all that apply) Options: Configuration files; Databases; Other.
-
9.
How are the values are assigned to the toggles in the system? (Check all that apply) Options: Assigned boolean values (True, False); Assigned multivariate values (e.g. Red, Yellow, Blue); Assigned string values (e.g. “disable-flash-3d”, “enabled-flash-3d”); Other.
-
10.
How does a developer access the toggle value in the code? (Check all that apply) Options: Value is accessed by checking a primitive data type (e.g. enableMyFeature == true),; Value is accessed through an object representing a toggle (e.g. MyFeature.isActive()); Value is accessed through a toggle manager/mapping from key to value (e.g. Dictionary); Other.
-
11.
How often does your team do the following clean-up practices? Options: Always, Mostly, About half of the time, Rarely and Never.
-
Limiting the number of existing toggles in the code.
-
Build or test failing if a toggle is not deleted by a specified date (Time bomb).
-
Automatic reminders near date to delete the toggle.
-
Using tasks/stories/cards for removing toggles.
-
Creating a clean-up branch for removing toggle points at the time of creation of the toggle.
-
Tracking unused toggles for removal.
-
Changing feature toggle to configuration setting to keep it in the code.
-
Rights and permissions
About this article
Cite this article
Mahdavi-Hezaveh, R., Dremann, J. & Williams, L. Software development with feature toggles: practices used by practitioners. Empir Software Eng 26, 1 (2021). https://doi.org/10.1007/s10664-020-09901-z
Accepted:
Published:
DOI: https://doi.org/10.1007/s10664-020-09901-z