Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

A lot of apps, for instance, have a free version and pro version. Do programmers, when a new update is released, remove lines of code that shouldn't be available in the free version? As for Visual Studio. Or demos. Or a lot of things actually.

share|improve this question

closed as too broad by Robert Harvey, Jimmy Hoffa, Blrfl, Bart van Ingen Schenau, MichaelT Aug 19 '14 at 19:54

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

5  
There are many possible approaches. You can set a switch. You can provide two different versions of a critical library. You can put all your code on a server and control it via security access. –  Robert Harvey Aug 19 '14 at 17:57
    
Sorry for being stupid, but what is a switch? –  Vinz243 Aug 19 '14 at 18:14
1  
@Vinz243 A switch is any sort of conditional statement that determines whether a given feature may be used. It could be e.g. #ifdef FREE_VERSION compile time switch that surrounds code that's run only in free version, or if (is_premium) {... runtime switch that checks whether correct license is provided, or another kind of switch. –  ikh Aug 19 '14 at 18:23
    
ANd what about java? –  Vinz243 Aug 19 '14 at 18:45
    
Sometimes the paid-for version contains two different related executables, e.g. the free command line thing and some costly GUI interface (communication with pipes, etc...). –  Basile Starynkevitch Aug 19 '14 at 18:58

2 Answers 2

How about compile time pre-processor directives? define FREE (or whatever you want to call your flag) in your compiler settings on Visual Studio and some features would not be built into the code.

See http://www.dotnetperls.com/if-elif-endif

http://msdn.microsoft.com/en-us/library/ed8yd1ha.aspx

share|improve this answer
    
And what about java –  Vinz243 Aug 20 '14 at 12:55

Nothing environment specific, but security-wise it would be smart to not include the entire architecture in the "Full Version," because "Free-Trials" tend to be easier to crack/reverse-engineer.

share|improve this answer
2  
""Free-Trials" tend to be easier to crack/reverse-engineer." Do you have any hard data on that? –  heltonbiker Aug 19 '14 at 19:09
    
I think he or she means that free trials are easier to reverse-engineer than a free version without the premium features at all, which is an obvious statement. –  Fengyang Wang Aug 19 '14 at 20:11
1  
This answer makes no sense. Maybe you meant "it would be wise not to include the entire architecture of the full version in the free version". And the reasoning why this should be done is wrong. A better reasoning goes like this: since free versions are typically freely downloadable for everyone, there will be many potential crackers trying - anonymously - to enable the missing features if those features are just hidden from the users by a simple feature toggle. If the code from the full features is simply not contained in the free version, it cannot be enabled by a crack. –  Doc Brown Aug 20 '14 at 7:33

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