Comments by "Scott Franco" (@scottfranco1962) on "Continuous Integration vs Feature Branch Workflow" video.
-
I call what is discussed here "traverse refactoring", that is, rearranging the code or adding routines to the code to support an upcoming feature, but that does not completely implement it. I break this down into two types:
1. Refactoring the code to make it easier to support an upcoming feature.
2. Adding routines/classes needed by the new feature.
Both of these don't break the code, and thus can be committed to mainline without affecting it. And perhaps equally important, these improvements can be removed if they don't work out.
The reason I call this traverse refactoring is from mountain climbing. If you are climbing up the face of a rock and realize it is going to be too difficult, you move sideways or "traverse" the rock face to find a position where continuing upwards is easier.
A few comments on other items described in the video:
Feature branching is an invitation to rebase hell. I have never been on a project with a significant amount of people (>3) where the code was not falling behind rapidly. This means rebasing, either frequently or all bunched up just before the merge.
Having "flags in the code"... this makes my head hurt. Two flags means 4 combinations. Three means 8, 4 means 16 combinations, etc. IE., you rapidly lose control of the codebase. Further, most of the code in a feature does not affect other code, meaning that you are only including it in tests (and in compiles if you are #ifdefing!) if the flag is on. Yes this method is common. No I am not a fan.
1
-
1