I have a software project that is working just fine. Now, this project has to be adjusted to model a new, but related system. What strategies are there to keep these two codes well organized? They will have a codebase that is about 90% the same, but there are many functions which need slight adjustments.
I have thought of the following:
I am not too satisfied by these solutions. Is there a better approach?
We have same problem and here is how we solve it:
#ifdef
section according configurationAdvantage of this approach is to keep common part always synchronous, and we isolate correctly each specific parts.
But, you have to be careful with not so far piece of code from each configuration. For example, with similar (but not same) code in different specific files, possible bug can be corrected in only one configuration. It can be reduce by defining some piece of code as common template or by re-thinking design to put some part in common
Hope it's answer will help you