I'm working on a special project where I need to create a new application with a similar but restricted functionality of an original application (basically a type of free application with limited functionality). Now, the problem comes with the maintenance of the code.

I'm using Visual Studio 2013 for the development and have Microsoft TFS as the source code repository. I do not want to duplicate my code so I thought of using the same files of the original product and introduced a MACRO to restrict the functionalities that I do not want to deliver. This way, I will be just changing some of the project files and will not be creating any duplicate copies. But the management is reluctant for any change in the original product's code even if it's just a MACRO.

So, my question is do we have any other way through which I can maintain the source code without any duplicate copies and without even changing the original product's code.

Thanks in advance.

  • Haha! +1 to the wag who marked this question as duplicate!
    – Steve
    Commented Jul 31, 2019 at 15:35

1 Answer 1


Someone at your company has to decide about the intended life cycle of the application:

  • will the "new application" be really a new application of its own, with its own life cycle, own maintenance, different feature development, separated bugfixing from the original one?

  • or is it only a new version of the old application, with a new feature "free restricted mode", which can be switched on and off somehow? So bugfixing, new (free) features, and other maintenance and evolvement are intended to be applied to both lines of development.

This is mainly a management decision: the first option will double your work for maintenance, so tell management if they want that, they might be prepared they need to hire a second guy for the additional maintenance effort, or they have to drop evolvement of the old application, or they have to live with the fact that evolvement and maintenance will need twice the time than now.

The second option can avoid this, but then they have to let you add something like a feature toggle to the existing code (in the next version). Technically, this could be something like what you call a "macro", I guess (I actually don't know what that means exactly in the context of the TFS, but I think these details don't really matter).

  • I believe the management here is more inclined to the first option. Well, they don't understand the pain in maintenance of the application. Probably, I'll give one more try to convey the idea of the 'feature toggle`. On the other hand, I'll also try to make up my mind to accept the decision for the maintenance. Anyways, thanks for the ideas.
    – The Apache
    Commented Sep 30, 2016 at 11:43
  • 1
    A Feature Toggle is really the way to go... why have two code bases to maintain when you could have just one? And as those codebases grow apart (which they will), a bug that effects both may no longer have the same fix for both (they should, but with less-than-stellar architecture, possibly not). It's essentially the same application... why lose all the re-use and existing logic, etc?
    – jleach
    Commented Sep 30, 2016 at 11:45
  • Yes, that's what I understood from the answer. But then, there's a saying The boss is always right.
    – The Apache
    Commented Sep 30, 2016 at 11:50
  • @TheApache: I guess your management will surely understand the "hire a second guy for the additional maintenance effort" of my answer. And if they do so, where do you see any pain in maintenance? Two applications, two maintenance teams, no pain.
    – Doc Brown
    Commented Sep 30, 2016 at 13:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.