Latest Post

The Basics of Poker What is a Toggle?

A toggle is a switch that has two positions, either on or off. It is often used to describe the act of switching back and forth between settings or programs, for example using the Alt+Tab keyboard shortcut to toggle between Microsoft Excel and Windows Calculator in a computer program. Toggle can also refer to the physical switch found on a device that is used to control its functions such as a light or fan.

The term Feature Toggle is also used to describe an algorithm or piece of software that runs in parallel with other code paths. This allows for experimentation with different implementations of a feature without affecting production users and can be an effective way to perform multivariate or A/B testing.

For example an e-commerce company may add an experiment toggle to their configurator and run it with two different suggestion algorithms to see which one results in more orders. This would allow them to get reliable data about the performance of each algorithm and then decide which to deploy to production based upon the result of the test.

When implementing Toggles there are many options for managing their configuration ranging from hardcoding them in static files which is not very dynamic through to more advanced solutions that use a database or some other form of centralized repository. Whatever method is chosen it is important to keep the number of toggles in the system low as unused ones can add cognitive overhead to the user experience.