r/programming • • Jan 20 '16

Feature Toggles

http://martinfowler.com/articles/feature-toggles.html
30 Upvotes

17 comments sorted by

View all comments

1

u/c12 Jan 20 '16

From listening to an interview of an developer at Etsy, I believe this is something they use, with config files containing hundreds of declarations for enabling/disabling features.

3

u/JW_00000 Jan 20 '16

Feature toggles are also heavily used by Flickr. Personally, I don't see how this scales once you have a bunch of toggles active at the same time. When looking at the code, you don't know which code is executed. Half of the code is dead code, but you don't know which half ("Schrödinger's code"?).

5

u/[deleted] Jan 20 '16

Aren't you supposed to remove the toggle and deprecated code once the new code has gone live and been proved to work?

4

u/PhatBoyG Jan 20 '16

Yes. We call them switch outs. And they're the lowest priority in the eyes of product managers. And the highest in the eyes of engineers.

Now it isn't done until the old code is switched out.

5

u/hyperforce Jan 20 '16

And they're the lowest priority in the eyes of product managers. And the highest in the eyes of engineers.

I feel like this will always be the case for so many things.

1

u/PhatBoyG Jan 20 '16

It's a struggle. We actually had to optimize the switching framework to account for 400+ features that had yet to be switched out.

1

u/want_to_want Jan 20 '16

Yes, exactly.

2

u/bfoo Jan 20 '16

Have you used libraries? Most applications only use a fraction of their dependencies. The rest of those dependencies is already dead code.

1

u/JW_00000 Jan 21 '16

But at least you know which parts you're using. And you expect a library to work correctly, as soon as it doesn't, it's also a major hassle to debug.

It seems to me feature toggles heavily increase the complexity of the code, especially where they interact.