If you transfer all IP rights to client, can you still reuse parts of source code?
<p>I'm trying to get into freelance/contract work for computer programming. Many clients want to "own everything" and have terms like "once paid, the developer transfers all rights to the client".</p>

<p>Does this mean I cannot reuse any parts of the source code, even small simple ones? For example if I build a program for a client, and part of the program involves converting 24 hour time into AM/PM time then can I reuse the code in another project or do I have to build it from scratch again? How could one even tell the difference? </p>

<p>What about abstract things related to programming itself, like data structures. C++ doesn't have its own linked list so if you use on in a project and transfer all rights to the client, then does that mean you can't reuse that library in another project? Does that mean you can never use a linked list again (I'm guessing not but then does it really matter if you build the code from scratch vs copy/paste from a previous project)? </p>

<p>I'm guessing there's some kind of threshold that has to be met for copyright to apply (it can't be too trivial or common place). </p>

<p>I'm not trying to rip of the client, I'm legitimately confused as most understandably want to own the source code but does that mean you can't reuse common features between projects? </p>

<p>It does mean that you cannot reuse any parts of the source code, even small simple ones. You would have to rebuild the code from scratch. There is a significant chance that the code would be "substantially similar" to the code that you were hired to build, also that if anybody else were to write a bubble sort or 24-to-am/pm conversion routine, it would look the same, where even variable names (which should describe function) are the same or very similar. In case of an infringement lawsuit, you would have to defend yourself by showing that there are only a few ways to code a given function.</p>

<p>Copyright protects only the "expression", not the abstract idea. A linked list is an idea, which can't be protected by copyright; same with recursion, pointers, stacks, object-oriented programming... Anything that involves copy and paste is infringement. If you re-read the copyrighted code and then try to reconstruct it, you probably crossed the infringement line. If you remember the problems and solutions and accidentally write somewhat similar code, that is probably on the safe side.</p>

<p>From the perspective of the programmer not wanting to always reinvent the wheel, it would be most useful to make a distinction in the contract between "the essentials of the customer's program" versus "incidental utility work". The difficulty will arise in saying specifically what is essential vs. incidental. For instance, I know that if I were to hire you to develop a speech-recognition system, low-level audio-acquisition and encoding would not be essential to my purpose, whereas DSP parsing routines would be the center of my interest. The programmer would then want to retain recycling rights to all non-essential code.</p>

<p>There is actually code that I have written several times. For my private use, and for use at three different employers. Each time without referring to any previously written code. It's a waste of time, but my employers paid for it. </p>

<p>If you do contract work, then you need to put into the contract what you want (if the other side agrees). If they want full copyright, then you write everything from scratch for them and get paid for the time. It is obviously better for everyone involved if they only get copyright for things written specifically for them, and a irrevocable, non-exclusive, unlimited license for any utility functions written by you (assuming the use of such utility code benefits them as well). </p>

<p>Irrevocable, non-exclusive, unlimited license means they can do with your software whatever they want, for as long as they want, but they are aware that others might get exactly the same license for the same code and can't complain about it, and you are still the copyright holder and have all the rights of the copyright holder, and they can't complain about that.</p>

intellectual-property software