Michael Long
1 min readApr 19, 2024

--

Be nice if you enumerated the biggest problem with adding feature flags: they tend to make your application untestable.

Add a feature flag to your application and you need to test both conditions. Add two and now you have four combinations to test. Add three...

And I think you begin to see the problem. One might claim that flag A and B and C don't intersect and that enabling/disabling one should have no effect on the other... but the operative word there is "should".

Until you actually test that combination, you really don't know for sure if there are any interactions or not. You can guess... but you don't know.

Another issue lies in the fact there's rarely a process in place to remove them when they're no longer needed, which tends to leave the application a fragmented, conditional mess.

Bottom line is that feature flags can be a nightmare for application maintenance, code quality, and for QA and automated testing.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

No responses yet