News for hackers. Stuff that matters.
Re:It's OK to hardcode feature flags by twisteriffic on Saturday February 01, 2025 @03:33PM (#42901966)
We did this. Two tables. One for feature flags, with name, desc, id, enum (none, defaultToEnabled, overrideToDisabled). One for user flag overrides, with flagId, userId, enum (enabled, disabled).

The combination of these two has been all we've ever needed. User segmentation, A/B testing, pilot soft launch etc are all easy.

Re:It's OK to hardcode feature flags by uutangohotel on Thursday February 06, 2025 @11:18AM (#42963868)
Would you mind expanding on the usage of enums for the feature flags table? Why not use a boolean?
Re:It's OK to hardcode feature flags by twisteriffic on Saturday February 08, 2025 @08:24PM (#42987683)
We actually did use booleans, I just found it easier to explain using enums, and the code would have been simpler if we'd done it that way.