- build an interface to the code to be changed
- make all code that uses said code use the interface instead
- build the feature switch into the interface
Re:Software Engineering at Google (2017)
by richardwhiuk on Friday January 04, 2019 @08:03AM
(#18823669)
You don't do that - you lots of small incremental refactors. I think Google also have tools to make a large refactor into a small change.
(i.e. you create the new API, migrate stuff to use it, deprecate the old one, migrate the rest, retire the old one).
Re:Software Engineering at Google (2017)
by VikingCoder on Friday January 04, 2019 @09:26AM
(#18824220)
Try like hell to use dependency injection in the first place.
For example: How do they untangle a wad of code that is large enough that it takes longer than a few days and more than a single developer to get the code back into a state that is acceptable for trunk?
The changes required for this kind of refactorings can be all over the place, regardless of any organizational boundaries in your code. I can't see how changes of this nature can be put behind feature flags.