1

Explore 5 Feature Flag Best Practices

 2 years ago
source link: https://hackernoon.com/explore-5-feature-flag-best-practices
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Explore 5 Feature Flag Best Practices

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.

@newslettersnewsletters

Official account for all of the HackerNoon newsletters. www.hackernoon.com/u/newsletters

As dev teams continue to improve agility, the tools, and approaches for building and deliveringsoftware 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.

ZXvwWhuaiAY0BoWkm8U7fJ1XTLI2-db1w35u4.gif

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

Less is More

ZXvwWhuaiAY0BoWkm8U7fJ1XTLI2-qgnc35e6.gif

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

ZXvwWhuaiAY0BoWkm8U7fJ1XTLI2-5a8a35ew.gif

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

ZXvwWhuaiAY0BoWkm8U7fJ1XTLI2-2f9l35l9.gif

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

ZXvwWhuaiAY0BoWkm8U7fJ1XTLI2-13dy35c8.gif

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 giantcompanies 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.

ZXvwWhuaiAY0BoWkm8U7fJ1XTLI2-v8fo355e.gif
dFW9aLMnLpgfjylixlaQdWQLp2C3-i49p3ovc.png

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK