For the past three months, I have been working on a complex and time-consuming project for a client. It's almost finished, now.

I added a license as a comment in each of the files, including three that are my personal libraries, for which I must protect the rights.

The issue is: for this type of plug-ins created with a specific cross-platform API, I can't create an "execute-only" type of software. I have researched and asked experts, and the only way the user would be able to execute it is with the full source code of the project.

Is adding a license at the top enough to protect the rights of this creation and my personal libraries ? Is there anything else I should keep in mind ?

  • Legally protecting your code is one thing; actually enforcing the license is another. Do you have the means to go to court, if need be?
    – morsor
    Commented May 22 at 10:49
  • Rights protection is something that only well-funded companies can afford to do. I tried early on. I found out that my ideas have a very short market time. It was far easier to recognize that only continued innovation and creation of new IP was the only way to profit from my ideas. Go out and create new libraries.
    – David R
    Commented May 22 at 14:19
  • Thank you both and @DavidR in particular. My project is not finished yet. If the user removes the comments from the code, how can I prove that those are my personal libraries ?
    – F. Zer
    Commented May 23 at 16:00
  • Instead of trying to protect the libraries, include a fee for the use of the libraries in the initial bid and include language granting a limited license (no reselling) in your contract. The vast majority of clients don't want to get into the source code and modify it. Most clients simply want to have a working solution. By having tested code libraries, you are able to solve their problems cheaper than your competitors.
    – David R
    Commented May 24 at 14:01
  • I really appreciate your answer, @DavidR. Thank you. Could you please clarify what do you mean by "include language granting a limited license" and "By having tested code libraries, you are able to solve their problems cheaper than your competitors" ?
    – F. Zer
    Commented May 24 at 17:31

1 Answer 1


Because "the only way the user would be able to execute it is with the full source code of the project", there is no "cheap and easy" way to protect the source code from a user modifying it.

A client who will remove all your copyright notices and sell your code without your permission will do that no matter what you have in the comments or in a contract. That type of client is not one that you can "protect yourself from" through legal methods. Only large companies have the financial muscle to take such a person to court, successfully prosecute them, and collect the damages. (I was advised by a successful lawyer that I needed to ignore these situations as it would cost me many thousands of dollars to prosecute them.)

A different strategy is to claim financial right to the modules at the onset. Include in the bid language along the order of "the final product belongs to you the client but includes modules which belong to me. I grant you a limited license to use these modules in this and derivative work without the right to sell such derivative work." You might also include the right to make copies for internal use. The bid can have a separate line item for the modules such as "internal libraries - $1,000." In this way, you can sell these modules to other clients.

Most clients want you to solve their business problem, not want source code that they can modify. Whatever you provide is very likely to be used without modification by anyone internal to the client. Instead, if they need it to be modified, they are likely to come back to you for more work.

  • I can't thank you enough for your valuable insights.
    – F. Zer
    Commented May 25 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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