paint-brush
Explore 5 Feature Flag Best Practicesby@newsletters
172 reads

Explore 5 Feature Flag Best Practices

by newsletters September 11th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Feature flagging is a lifesaver that can support novel workflows useful to the modern methodologies. An excessive number of feature toggles means that there is a growing number of code paths. To avoid that, turn to this practice only when it seems logical and always repurpose the existing features if possible. Feature toggling lets you deploy code fast and with the least disruption. But when your experiment comes to an end, it’s time to wipe the slate clean to avoid further chaos.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Explore 5 Feature Flag Best Practices
newsletters  HackerNoon profile picture


As dev teams continue to improve agility, the tools, and approaches for building and delivering software continue to improve as well.


DevOps and CI/CD practices assume the role of a solid basis for releasing software with boosted automation and decreased risk. And one of the sure-fire ways to guarantee that everything that a customer faces is not subject to catastrophe is to leverage feature flagging.



With that said, let's give you a low-down on top practices for this part of the software development process.


Less is More



Here’s the thing: Feature flagging is a lifesaver that can support many novel workflows needed in modern methods. However, going overboard with this practice can have the opposite effect.


An excessive number of feature toggles means that there is a growing number of code paths.


As a result, you end up with increased code complexity and complicated testing. To avoid that, turn to this practice only when it seems logical and always repurpose the existing features if possible.


A Feature Flag Whose Job is Done Should Sink Into Oblivion



Feature toggling lets you deploy code fast and with the least disruption. But when your experiment comes to an end, it’s time to wipe the slate clean to avoid further chaos.


Otherwise, you face the risk of introducing the false feature to the audience. You can consider setting expiration dates for your feature toggles to cut through all that.


Know Your Enemy by Name



Technically, feature toggles are your best friends, but naming them still helps. To navigate the ocean of feature switches, it is important to give them a nomenclature. Without labeling them, it is easy to get lost.


Most likely, you will forget about their designated use or use the same name another dozen times. And none of this will give you a leg up. Therefore, make sure to have a unified tagging system for better control and team communication.


Use a Feature Toggle Management Tool


Having a solid, easy-to-use platform helps to safely test features in production. You may think you are better off with a simple page of on-and-off checkboxes. But it gets trickier with the increasing number of features with a variety of statuses.


Feature toggle management tools, on the other hand, account for better command of the application when you scale it.


Use Feature Toggles for Experimenting



Finally, feature switches empower software engineers with tools to roll out new features to particular audiences. Thus, instead of reading the tea leaves, you can just show the new functionality to the users and gauge their reaction.


Imagine integrating a “get started” CTA button with different graphics, button styles, and font to see which one generates more clicks. Feature flags let you demonstrate the new functions to a narrow target audience and fetch valuable insights.


You can then use those insights to course-correct the development and fine-tune the feature to users' preferences. That’s how giant companies test the waters before rolling out a new update.


Summing up, feature toggle is a powerful technique that makes development faster and safer. Also, it’s your workaround way to deploy a new feature into production without turning it on until you’re ready. Make sure to use it wisely and implement the time-tested practices mentioned above.



Subscribe to HackerNoon’s thematic newsletters via our subscribe form in the footer.