Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The company I work for develops custom factory automation applications for multiple customers. Even though each application is custom, they contain common code which is re-used across projects.

One of the customers is now looking for the source code to their application, which has caused a major storm in the company. Management have decided that we can't give them the source to the shared components as they are used by other customers. I've been asked to modify the shared components 'enough' so as they aren't common.

So my questions are:

1) Legally, should there be any problem with re-using common components for different customer?

2) If I really need to modify the common components, then how much is 'enough' ? (I know this sucks, but I either do this or hand in my notice).

Oh yeah, and my company has no license in place with any of these customers.

share|improve this question

closed as off topic by Caleb, Thomas Owens Sep 17 '12 at 13:09

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

You should consult your company's lawyer. – M. Dudley Sep 16 '12 at 4:57
Just give them the code obfuscated and with no comments. It compiles to their shipped binary version, they will have no ways to compare it to other systems code and let your stubborn managers to take the flak that will be fired in your direction. Did that once with to telco that requested code for some of the our IP that they had no right to. – Daniel Iankov Sep 16 '12 at 17:23
Any question that starts with "Legally,..." is unlikely to be on topic here. – Caleb Sep 16 '12 at 18:37
@canice Is there any specific reason why you don't simply give them the source code under a non-exclusive license? This is exactly what 'non-exclusive' means... – K.Steff Sep 17 '12 at 3:02
Questions like this are, as others have pointed out, best suited for lawyers. There are too many factors in play here, ranging from local laws to the conditions of the contract. – Thomas Owens Sep 17 '12 at 13:10
up vote 1 down vote accepted

This sound to me as a lacking policy of your company with customers. In another words, your agreement with customer should indicate who once the copyright of the product and the source.

In most cases, software contacts do indicate that provided software is build on COTs and some proprietary systems. Thus the common components which may also referred as base engine is never provided back to customer as a source-code. However, customer business specific customization and development code is usually provided back to the customers.

1) Legally, should there be any problem with re-using common components for different customer?

There might be issues if not indicated in the agreement contract. At least it is a strong case to be considered in the US. I would advice to get a legal consultation from lawyer. It would eliminate all law suits that your company may face with.

2) If I really need to modify the common components, then how much is 'enough' ? (I know this sucks, but I either do this or hand in my notice).

I would try to separate the base/core engine functionality from the rest custom implementation in first place. Afterwords, i would deliver only that customized code a s source code, and base engine as a core dll.

share|improve this answer
I argued that we should look for a legal way out of this (i.e. get a lawyer) but there is a reluctance in management to look at this - I presume from a cost point of view. The common code is split between DLL's and source code that it copied and slightly modified. The current plan is to give them all the source code, so it would involve modifying the source to the common DLL's – canice Sep 16 '12 at 12:40
The involvement of lawyer would depend from country to country. I know that at least, in states it is a serious matter. – Yusubov Sep 16 '12 at 15:45

It's all about who owns the copyright on the code. The contract that your company has with its customers should spell out that your company owns the copyright, and you're just selling them a license. In that case it doesn't matter if you provide them a copy of the code. I've seen cases where your license provides for the customer to have a copy of the code and make changes as long as it's only used on the one site where it's licensed for (that particular factory).

On the other hand, if there's some ambiguity about who owns the copyright, then you've got bigger problems.

share|improve this answer

Is the rewrite intended to keep your source code secret? If the rewrite works, won't it be just as good as having the original? If you effectively obfuscate the code, it won't be useful to your client. I could talk about the work involved and the ongoing maintenance to keep a rewrite in synch with the original so you can continue to send new releases to this client, but I won't because it makes no sense. Don't rewrite anything.

I am not a lawyer, but I think you are right that this is a legal issue - you need to hire a lawyer. At the very least, I would first make your customer sign a non-disclosure agreement, then deliver the existing source code to them. Done. You can probably find a boiler-plate draconian NDA on the web. This is the industry standard practice. If their lawyer wants changes to your NDA, you will have to hire a lawyer for just this one issue.

If there are non-friendly jurisdictions involved (e.g. your client is in Libya or Yemen), then you have to just say no to the request for the source code. You may have to say no anyway if giving away the source code puts your other clients at risk in any way. You have a real legal gap here, with no license whatsoever.

Why can't you fix the issue for the client without giving them the source?

share|improve this answer
I'm curious to why it matters where in the world the client is? – Matsemann Sep 17 '12 at 8:49
Because it is illegal to provide some types of technology to entities operating in some countries (security, crypto). Also if you are doing business in the developed world, you can rely on at least some kind of rule of law to protect yourself, your interests and your IP. – Daniel Iankov Sep 17 '12 at 9:00
@GlenPererson, the rewrite it to avoid any possible legal claim of owership by one of our customer over the same code used by us for other customers. I don't believe that the customer looking for source will even do this as it would probably damage their reputation, but it's not my decision. I'm based in Europe (I'm deliberately being a bit vague) but most of the customers are large US multinational companies. There aren't any security sensitive components in our solution and 90% our deployments are within our own country. – canice Sep 17 '12 at 11:50
@canice - Who owns the rights to the programs you sell. Your clients or your company. if its your company that owns the rights to the source, then you can give away the source to anyone you want, depending on your license with your other clients. If the clients each own their rights to their software, then your already in trouble, since each of your clients have rights to the same exact thing. – Ramhound Sep 17 '12 at 12:55
@canice - Doing a complete rewrite should get around copyright issues, but because the functionality will have to be the same it may not protect you from patent claims. More than ever, I think you need a lawyer who is familiar with EU and US patent, copyright, and contract law to craft a license for you. It's expensive, but you are betting your entire business on it. With the right legal agreement, it doesn't matter what you do with the code, but any code without a legal agreement is a liability. – GlenPeterson Sep 17 '12 at 13:13

1) There is no problem with using the same components for multiple customers. Assuming there is no contract agreement against it. Microsoft has shipped common windows code to millions of customers in every legal system in the world.

2) Modify loops to count down instead of up. Rename things. Swap some lines of code where the sequence of execution is irrelevant. Instead of a function returning a value, add a new parameter that works via side effects to simulate a return value. Make a XOR swap instead of a normal swap. Throw in some shift operations. Replace some generics to use duplicate implementations for each type.

If you're feeling frisky make some "real" changes to the design or and core algorithms used.

It's just a game so don't take it too seriously.

share|improve this answer
Why the downvotes? Just about every system in the world uses shared components. Even defense related systems. 2) is a bad idea, but he has to do it or hand in his notice. – Lord Tydus Sep 17 '12 at 23:12
Honestly, your answer just comes off flippant. It reads like you're suggesting the OP just fakes his way around whatever rules are in place, especially when you say "It's just a game so don't take it too seriously". On the contrary, legal matters (no matter how inane) should be taken seriously. If nothing else, we all like to stay employed, right? – Adam Lear Sep 18 '12 at 1:17
Because the answer doesn't answer the author's question. What the author's company is doing and what Microsoft does, based on the details provided, are not even close. You also act like following the rules and the law are not important. – Ramhound Sep 18 '12 at 15:09
I posted the question as I was hoping to find out the experience of other developers in similar situations. As I've worked in software development for a few (>20) years I wasn't taking it too serious on a person level, but thanks Lord Tydus for looking out for me! BTW I didn't downvote you. – canice Sep 19 '12 at 20:16

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