Closed bryanwoods closed 10 years ago
I'd be -1 on "polluting" the user method namespace with experiment names. I'd be less so for a single feature_enabled?(name)
method.
I agree that hardcoding 1 is a bad idea. For a start if you have 3 buckets, often 1 and 2 will be "on." Config option would work better - on the fence about whether it really helps tho.
I'll close for now and submit something for the config changes for a future discussion sometime
This is probably way too aggressive, but just opening a PR to discuss implementing something like this. Essentially, I've noticed we've started writing helper methods to determine a feature's visibility for a user that look like this:
So this change would allow you to call a predicate method matching the desired experiment, eg:
The most obvious downside is the hardcoded '1' for the 'on' bucket. This is because the "onnyness" and "offyness" is currently in human-readable text in the notes section of the YAML file. Codifying this in some way like
Would alleviate that, but not sure whether or not we see that direction as beneficial.
I could also implement this in a much less extreme way -- wanted to open a dialogue about whether or not this is even useful.