This was a great read, I’ve been using feature toggles a bunch recently to make multi-stage deploys go a bunch easier. One problem the team has been running in to is that we don’t have a good process for removing the toggles.
So: How are you being disciplined about removing these flags?
We’re not using feature toggles at my current job, but my approach in the past was to have three states for a feature. A Feature can be off, on, or not-present. Not present is equivalent to ‘on’, but it also generates a test failure that CI catches. All the features are controlled through a single file which is managed by the PO or whoever owns those things, and the build system notes how long ago the feature was set to ‘on’, after it’s been consistently ‘on’ for a while, it automatically removes the flag; leaving the feature ‘on’, but generating an error which a programmer has to go solve before the build passes clean. That reduces the discipline from one of ‘remember to remove these’ to ‘remember that the build must be green before it can go out.’ The latter is much easier to automatically enforce.
Yes and No….
Consider our case we started off with flavour “plain”.
And then added “American” flavour and “British” flavour.
I insisted on building all three variants continuously off the mainline.
To prevent inappropriate coupling.
I keep finding people trying to wire American flavoured code in strange places it really doesn’t belong.
By not even building even the basics of American flavour into the “Plain” and “British” builds… I get the compiler and linker to slap the programmer every time he does so.
Of course, the obvious did occur… despite hand on heart protestations from the marketing department that it could never ever ever happen….
Yes, we did end up having to build a combined American and British flavour as well…
You never have your abstractions right until you have built at least three variants on top of them.
Your N variants mean nothing…. unless you continously test and fix all of them!
Doesn’t it seem like there was an abundance of posts using the term “considered harmful” until the article bashing the phrase came out? Now it seems that those people have just chosen to use the term Technical Debt. The phrase has become meaningless to me because of its overuse.
The article I know of bashing the phrase came out in 2002. Are you thinking of a more recent one?