99

I have a client who would like me to deliver the source code with a developed application binary. They originally said nothing about source code, but they recently said they need it. The contract is not finalized. They agreed to the work, did not sign, and then came back with this clause.

The issue is: I have a code base I've created over the years and used as a template for most of the applications I write. It is far larger than the scope of the project.

I also intend to use it for a product, so I really don't wish to provide it for a relatively small project.

I'm guessing this is not the first time that this has happened in this industry. What is the best way to circumvent this issue? I'm guessing things like shared libraries could help.

Ixrec
  • 27,621
  • 15
  • 80
  • 87
robby987
  • 1,079
  • 1
  • 7
  • 4
  • 1
    They originally said they nothing about source code but recently said they need it. – robby987 Apr 05 '15 at 02:36
  • 2
    The contract is not finalized, they agreed, did not sign and then came back with this clause. – robby987 Apr 05 '15 at 02:40
  • 19
    What do they need it for? Chances are they only want to be sure to have the code in case you go out of business. You possibly can add licensing that limits allowed usage. At one time a company I worked deposited (right word?) source code with a lawyer company as security for such a case. – thorsten müller Apr 05 '15 at 06:48
  • 33
    Custom software should be delivered with source code. Otherwise, it's a retail product. I don't think they need a frozen product in case anything happens to you/your business later down the line. But do charge accordingly. Also consider putting your library code in a compiled library *(if supported by your language)* so they can modify the software, compile it but not easily reuse your library by itself. – CodeAngry Apr 05 '15 at 12:29
  • 14
    @CodeAngry "should"? No. Only if they pay the right amount of money. – o0'. Apr 05 '15 at 14:44
  • 5
    @Lohoris If it's a software built per their specification... it's theirs, unless agreed otherwise. – CodeAngry Apr 05 '15 at 14:56
  • 32
    @CodeAngry nope. It's yours, unless agreed otherwise… – o0'. Apr 05 '15 at 15:19
  • 4
    @Lohoris unless you were a salaried employee and used their computers to make it. – Jon Apr 05 '15 at 22:59
  • 46
    Let's face it - no matter how many years you've put into your framework, it won't have any value to anyone but you. Noone will create a new application based on an undocumented, unsupported, and generally unknown framework, no matter how good you think it might be. Give the complete source code to them, make sure you retain the copyright to the non-bespoke parts of your application, and get a happy customer. – Guntram Blohm Apr 06 '15 at 20:30
  • 3
    @GuntramBlohm free of charge? Are you serious? – o0'. Apr 06 '15 at 21:13
  • 5
    @Lohoris I will probably say something like "Using the library will speed up the project by X hours, so i'll charge you Y hours plus X/3 for the library". But they won't use the library for anything else anyway. If they wanted to, they'd have to spend considerable time learning it; time which is better spent on some standard. Would you rather invest 2 days into learning (well-documented) JQuery, or much longer into learning a library noone else uses, knows, develops, tests, and debugs? The lib is valuable to robby because he wrote it, but very probably not to anyone else. – Guntram Blohm Apr 06 '15 at 21:23
  • 1
    In your situation you will have tough negotiation, because your source is worth at least one to three times the price you got for the solution. So lets say you got $1.000 for your work, then offer $2.500 for source or Software Escrow Agent at their cost! The source is yours and you alone Devise what Happens with it. Just remember to create a non-exclusiv license and place your copyright and email in the header comment block. You should say NO to free source. This is value. But don't say no in general. Find a solution that pleases both parties. – hexerei software Apr 07 '15 at 06:52
  • All the answers below seem to belong on The Workplace rather than Programmers. OP is asking about how to deal with proprietary shared/utility code when handing over client-specific source code, specifically how to hand over the custom code without exposing the source of the shared code. Whether he should hand any source code over or how that should be legally/financially handled is worth considering but **doesn't answer the question.** – Lilienthal Apr 07 '15 at 11:04
  • 2
    You could make your framework code free software. – Basile Starynkevitch Apr 07 '15 at 13:15
  • 2
    @Chipperyman "I have a code base I've created over the years and used as a template for most of the applications I write." - this software isn't written for this client, on their machines. And even then, work for hire depends on jurisdiction. –  Apr 07 '15 at 13:53
  • 1
    @Guntram Blohm: You really cannot know in advance. AFAIK rails was developed as the framework for a specific project and, after it was made public, it was widely adopted. – Giorgio Apr 08 '15 at 07:20
  • 2
    I'll let you all know what happens when I've concluded the contract. – robby987 Apr 09 '15 at 14:35
  • 1
    Would it be possible to strip out everything in the library that their application doesn't use, and only sell/give them the minimum they actually need? – Brendan May 11 '15 at 15:31
  • @robby987 Did you already conclude the contract? If so, how did it go? – Dennis van der Schagt Aug 09 '15 at 22:06
  • A great question and a lot of good answers and comments. Negotiate delivery of the source code but with an increased dollar amount and accompanied by a licensing agreement which protects your interests as well as theirs. Simply reason that the cost quoted and verbally agreed was based on compensation for use of the output of your intellectual property, and not for rights to that intellectual property. – Thomas Carlisle Mar 28 '17 at 11:45
  • @GuntramBlohm, Re "*it won't have any value to anyone but you*", And... who knew KDE's decade old code base is still used to build today's browsers? – Pacerier Jun 21 '17 at 15:35

8 Answers8

138

The first thing to keep in mind is that source code has value separate from the binaries. It is perfectly reasonable to either refuse to sign a contract that requires source code delivery, or to insist on extra payments for source code delivery. Contracts are two-way documents. Do not let the other part dictate what is required just because they are "big companies" and "do this all the time". First, decide what you are willing to deliver and how you want to be compensated. Then take their contract to a lawyer and work out what needs to change. Then, you negotiate.

Don't do what a lot of young people do when they start contracting. Don't just sign because it seems like they have lots of experience and you don't. That's a good way to get ripped off.

Look into why they want the source. They may want it so they have the option of using another developer later on. Or they may want it just because they are afraid you might get hit by a bus and suddenly they'll be left with binaries that they cannot improve. If it is this second case, look into a Software Code Escrow Service. These services hold the source code in case you go bankrupt or otherwise are unable to maintain the software. This may satisfy both your desire to keep your code proprietary to service other customers and their desire not to be left holding the bag with an unmaintainable set of binaries if something bad happens.

Gort the Robot
  • 14,733
  • 4
  • 51
  • 60
  • 17
    What if Software Code Escrow Service go bankrupt? – user11153 Apr 07 '15 at 10:04
  • 21
    Then the owner of the code is - hopefully - still around, and can deliver his code to another Escrow Service. The service is intended to remove the Single Point Of Failure. – Alexander Apr 07 '15 at 11:54
  • 17
    Do Software Code Escrow Services use Software Code Escrow Services? – FreeAsInBeer Apr 07 '15 at 16:28
  • 31
    @FreeAsInBeer: No, they use Software Code Escrow Escrow Services. Obviously. – nneonneo Apr 08 '15 at 06:09
  • @Alexander, Only if re-escrowing is a contracted obligation. Otherwise the developer will charge for second escrow again. – Pacerier Jun 21 '17 at 16:12
  • @nneonneo, Using an escrowed code escrow is more beneficial to the developer when compared to using multiple code escrows, because in the latter only one judge out of multiple needs to agree for the company to get the code. – Pacerier Jun 21 '17 at 16:13
68

"No" is a perfectly fine answer, actually it's an incredibly useful answer which for some reason I can't understand is very underrated.

"Hi, we have suddently decided we just want source code too, free of charge."
"Hi, no."

It's not that difficult, really.

Then, if they wish to pay egregious amounts of money over what they already owe you, you might give them a trimmed version of your application, which includes only the sources they actually need, and taking care they get absolutely non-exclusive rights.

Don't complicate simple things.

o0'.
  • 839
  • 5
  • 9
26

Your question is, "what is the best way to circumvent this issue?" But what do you see as the issue? Others have correctly pointed out that it's a matter of negotiation: everything has a value, and it's up to you give the client a price for providing what's asked for.

But you must also carefully consider—and write into the contract—the implications of providing the code. Is it just so the client can see it? Can the client modify it? And in particular, would you consider giving your client exclusive rights to the code base you have created over the years and is used as a template for most applications so that you can never again use it yourself in the future?

You need to ensure the contract explicitly states who has rights to use the code, and in what ways.

svick
  • 9,999
  • 1
  • 37
  • 51
Reg Edit
  • 954
  • 8
  • 11
19

Remember that any source code requires a license. If you hand over source code, the company can use the source code to do anything that the license allows, and anything beyond that is copyright infringement. So if you hand over source code, you would have a contract that makes absolutely clear that you retain the exclusive copyright of the source code, and exactly what uses of the source code are allowed. And of course source code + license wouldn't come for free.

A major company would be unlikely to infringe your copyright, because being caught would cause a major damage to their reputation, apart from financial damage. On the other hand, paying out for software with no guarantee that any problems can be fixed in the future, might be unacceptable for the client.

gnasher729
  • 42,090
  • 4
  • 59
  • 119
  • 33
    **BUT** also consider that detecting source code misuse is incredibly difficult, especially if you aren't searching for it. Don't blindly trust a license: for some people it's just a piece of paper. – o0'. Apr 05 '15 at 14:52
  • 1
    @Lohoris however, if you suspect that an application is using your code, it's really easy to tell, no matter that it's just a binary. Basic reverse engineering skill is all you need to be sure. – rev Apr 05 '15 at 23:16
  • 6
    -1 since I don't think there's any evidence for your "A major company..." claim, it's just a guess. – djechlin Apr 06 '15 at 03:34
  • @Lohoris: If that happens, what is the damage to you? Best case: The poster offers his services to another company, and finds they already have the library he is so proud of. Major payday! – gnasher729 Apr 07 '15 at 13:54
15

Earlier I usually provided the source code (libraries and all) under a MIT license to the client. If your libraries are well organized you only provide the needed files/resources for that particular client but nothing more. I think that is fair for both me and the client. However there was always the issue of new code written for that particular client under contract that was not part of the library before. So I started to discuss the issue with the client before starting the project. Some clients wanted ownership of that code, some don't (I always gave negative incentives, like higher prices for those who do). But, really for some clients that discussion was very confusing and sometimes I ended up talkin for 3 or 5 different people (including their lawyer) just to get the project approved.

So now all my libraries are part of a custom framework I always use to develop and I explain the client that I will use this framework but that the framework is a different product with a different license. (Sometimes I use "software components" when explaining because "framework" may be unkown to them). I always provide the code of the used files under a MIT license and (because all the code is well organized) the low level code (even the new) remain in the framework (to be reused by me and by them) but the code relating to their application only is for them to keep under their own terms (that code most probably would be useless for me to reuse in another project). Of course all that is properly written in the contract. I think this is fair too.

The key is: "these components are a different product" and all is written in a contract before starting.

So yes, you idea about using shared libraries may be right. However, I ask you, why don't you provide them the source code you used, under a license that will allow them to reduce their risk? I think that would be fair.

MV.
  • 259
  • 2
  • 6
  • 2
    I think this feels like a good answer. The OP obviously shouldn't just roll over, but, on the other hand, asking for the source code for a custom project seems eminently reasonable (and I've seen enough contracted projects go totally off the rails and need to be rescued by someone else that I probably would not consider a contractor who refused to offer source, if I were looking). – Casey Apr 07 '15 at 15:38
11

The way to deal with this is to negotiate.

If they want source code, then they should be prepared to pay for it, and it is up to you to decide how much that should be.

On the other hand ... if they are not prepared to pay what you want, they may decide to "take their business elsewhere".

Welcome to the world of business :-)


And when you talk to prospective customers in the future, be sure to mention this issue early on ... to avoid wasting everyones' time.


It is also worth noting that what you are doing is anathema for open source developers, and for (educated) customers who are looking for open source solutions.

Stephen C
  • 25,180
  • 6
  • 64
  • 87
  • 5
    Firstly, there's far more possibilities for a license than "they want". Secondly, I think it's very unfair for you to blame the OP for not "bringing this up early enough" instead of the company. This is a bit editorialized. Thirdly, I don't see why open source developers face anathema if they wish to work on a closed-source project. Fourthly, if the company were looking for an open source solution they would be asking for that, not a private copy of the source code for their purposes. – djechlin Apr 06 '15 at 03:37
  • 1
    @djechlin - 1) I didn't blame the OP. But if he is not prepared to negotiate on that point ... then he >>should<< have brought it up earlier. It is an obvious and reasonable requirement for a knowledgable customer for bespoke software. 2) The "anathema" would be what the OP is doing ... trying to hold onto the source code. 3) While, there is no indication that the customer asked for open source (maybe, they don't really understand its benefits) its clear that the >>do<< want the source code, which is one of its prime benefits of OSS. – Stephen C Apr 06 '15 at 10:52
  • 3
    This comment is spot on. As a software developer myself, all my clients get an exclusive license to use and modify the software, and I provide them with source code. In addition to that, I retain the right to reuse code that I have written in other projects, and to reuse code from other project in this project. This saves them money and both of us time. Nobody has ever had a problem with that. – dotancohen Apr 07 '15 at 08:39
  • 1
    @dotancohen: I hope they get a "non-exclusive" license. If they have an exclusive license, you can't reuse the code for the next customer. You can't have two customers with an "exclusive" license for the same code. – gnasher729 Apr 07 '15 at 13:57
  • The license permits them to use and modify the code, but not to share, sell, or distribute it. Being mostly PHP running on VPS's, there's not much that I could do, or would care to do, if the code 'leaked'. I don't see it as a big deal in the field that I work in. – dotancohen Apr 07 '15 at 15:18
5

This may be too late for you, in that you may already have agreed contractually to do this, and you could have agreed to mutually incompatible terms with different customers.

There are two ways in which you can provide your customers with your source code. Ownership of the copyright and licensed.

Some customers will want ownership of the source code. This means, at the end of the process they will pay you money and you will in exchange give them copyright copyright of the code you create for them. One reason for this is if they see significant potential for intellectual property in the source code, and may want to value this on their company balance sheet. In this scenario, you will have no entitlement to continued use of that source code for other projects, unless you also obtain a license from your customer giving you this entitlement.

If your customer is buying an 'off the shelf' product from yourselves, they would expect to be receiving a license to use the software, not ownership of the source code. They should be expecting that you are selling the same (or similar) software to many other organisations, and that they are hopefully benefiting from a lower cost of purchase due to the wider customer base.

However, the situation in this question is a mishmash of the two.

Here is what I would want to be able to do. I would grant your customer a license to use (and modify) your shared code. If quizzed by the customer, I would point out that this is shared code that you have already used in multiple projects and have current bids in place for future work that are based on you continuing to use this work. point out that this has resulted in less time on this project for your customer and that they have paid a lower price as a result. Like other shared libraries of code used by the project, they have a license in place to use this code, and to allow other development teams to develop this, and other projects based on this library. However, if they would rather ownership of all the code, you are willing to create a replacement, but this would be an additional charge.

Depending on what you have already committed yourself to, you could be having to write a replacement functionality for free, or giving away your source code.

Remember, there are different types of libraries. The Standard Template Library in C++ is a good example of a library that is included at a source code level and is compiled into a project executable that may be quite similar to how you have used your common code.

Michael Shaw
  • 9,915
  • 1
  • 23
  • 36
  • 1
    From [this comment](http://programmers.stackexchange.com/questions/278281/client-wants-source-code-but-it-contains-a-lot-of-shared-code-i-reuse-with-othe#comment572194_278281): "The contract is not finalized, they agreed, did not sign and then came back with this clause." - as its only two days ago, I'd assume that the negotiations are still on going. –  Apr 07 '15 at 13:51
0

If you use a third party with the software that you deliver, chances are that you don't have the source code for this third party. You will still deliver the software to the company with binaries of the third party. The code that you developed as a framework shared in all your projects is exactly like third party even if is owned by you. In this case, the company have exactly the same risk with the binaries of your framework than with the third party. Why in this case would you give to the company the source code of your framework. You can provide to her a good API documentation with a licence agreement and that it. If your code contain the next big thing that will revolutionize the industry, it's another story but it's generally not the case.

Samuel
  • 211
  • 2
  • 9