What is a Toggle?
Toggle is a switch that has two positions, on and off. It is found in computers, phones, and many other devices. It can be used to switch from one thing to another such as switching between screens when video chatting with two friends at once. Toggle can also be used to change preferences or settings.
When used in software development, toggles are a way to experiment with different codepaths without affecting the existing production environment. This is often called A/B testing or Canary Release and can be very useful when making data driven changes to a system.
A toggle is also a tool for adjusting things such as the speed of game play or audio volume. This is a feature that can be enabled and disabled with a button press which allows players to customize the gaming experience.
Toggles are also a key part of a CD/CI workflow. They can be used to deploy new artifacts into a testing environment or even to dynamically re-configure a specific service instance at runtime. Using this functionality judiciously can make a CD/CI pipeline much faster and more accurate.
Savvy teams view Feature Toggles as inventory that comes with a carrying cost and seek to keep that inventory low by regularly removing toggles that are no longer required. To help them accomplish this goal some teams use a rule of adding a toggle removal task to the backlog whenever a toggle is first introduced while others put “expiration dates” on their toggles which will cause tests to fail (or even refuse to start) if they are still around after that date has passed.