copyright software
How to recreate functionality without violating software code copyright laws?
<p>What would happen if I need to recreate code for a software function I did previously?</p>

<p>The catch is that even when I'm writing it from scratch I cannot make it very different from how it was where I originally did it because I know the design very well and so the new code would be very similar to original code. </p>

<p>Although there will be slight differences, the code would likely end up looking similar to original because its just the most efficient way to write that feature.</p>

<p>Otherwise I'd have to purposefully induce imperfections and scramble the names to illegibility just to avoid any possible copyright infringements.</p>

<p>So you're trying to avoid a claim for copyright infringement.</p>

<p>As you know, the linchpin to copyright infringement is copying. If you don't copy the previous code that you refer to, you're not copying, and there can be no copyright infringement. That is a question of fact. If you don't have access to the previous source code, you can't copy it.</p>

<p>As you say the code is relatively simple, you could develop the code in a clean room (ie no previously developed code is accessible to you), and document the process as you do it. </p>

<p>That would probably reduce the prospects of someone coming to you later and succeeding in a claim for copyright infringement. </p>

<p><strong>(I'm not a lawyer. DO NOT rely on the content below as legal advice. Please consult an attorney for your serious business.)</strong></p>

<p>Since you said </p>

<blockquote>
  <p>Although there will be slight differences, the code would likely end up looking similar to original because <strong>it's just the most efficient way to write that feature</strong>.</p>
</blockquote>

<p>I will abstractly, without exploring into your factual circumstances, discuss the question of <strong>whether, in implementing a specific feature, it infringes copyright to use copyrighted software code that is the most efficient way to implement that feature</strong>. The discussion focuses on US copyright law.</p>

<p>(tl;dr; go to the bold paragraph at the bottom.)</p>

<h3>Expression-Idea Dichotomy</h3>

<p>Copyright only protects expression of ideas, but not the ideas themselves. For example, copying the content of a cookbook may result in copyright infringement, but simply cooking by following the procedure (idea) outlined in the cookbook generally does not infringe copyright. Simply speaking, by offering the authors limited-time protection over their expression, copyright is an engine that encourages people to generate expression. The ideas embodied in these expression, as implemented in the real world, benefits the society as a whole. Therefore, the purpose of copyright law, in some sense, is to encourage the implementation of ideas embodied in copyrighted expression.</p>

<h3>Merger of Expression and Idea</h3>

<p>But expression and ideas sometimes merge. When this happens, the idea (which has merged with its expression) is no longer protected by copyright law. For example, in <a href="https://en.wikipedia.org/wiki/Baker_v._Selden" rel="nofollow noreferrer">Baker v. Selden, 101 U.S. 99 (1879)</a>, Selden described a book-keeping system in his book, which includes certain blank forms. To use the book-keeping system in Selden's book, copying these blank forms is inevitable. The Court holded that there was no copyright infringement and explained:</p>

<blockquote>
  <p>... But this object
  would be frustrated if the knowledge could not be used without incurring the guilt of
  piracy of the book. And where the art it teaches cannot be used without employing the
  methods and diagrams used to illustrate the book, or such as are similar to them, such
  methods and diagrams are to be considered as necessary incidents to the art, and given
  therewith to the public; not given for the purpose of publication in other works
  explanatory of the art, but for the purpose of practical application...</p>
</blockquote>

<h3>Merger of Expression and Idea in Software Code</h3>

<p>When there is only one or very few ways to (efficiently) implement a certain idea in computer programming, such as an algorithm, the expression (the software code) and the idea (e.g., the algorithm), may have merged. The court in <a href="https://en.wikipedia.org/wiki/Computer_Associates_International,_Inc._v._Altai,_Inc." rel="nofollow noreferrer">Computer Associates International, Inc. v. Altai, Inc., 982 F.2d 693 (2d Cir. 1992)</a> explained:</p>

<blockquote>
  <p>While, hypothetically, there might be a myriad of ways in which a programmer may effectuate certain functions within a program, — i.e., express the idea embodied in a given subroutine — efficiency concerns may so narrow the practical range of choice as to make only one or two forms of expression workable options. See 3 Nimmer § 13.03[F][2], at 13-63; see also Whelan, 797 F.2d at 1243 n. 43 ("It is true that for certain tasks there are only a very limited number of file structures available, and in such cases the structures might not be copyrightable. . . ."). ... It follows that in order to determine whether the merger doctrine precludes copyright protection to an aspect of a program's structure that is so oriented, a court must inquire <strong>"whether the use of this particular set of modules is necessary efficiently to implement that part of the program's process" being implemented. [] If the answer is yes, then the expression represented by the programmer's choice of a specific module or group of modules has merged with their underlying idea and is unprotected. []</strong></p>
</blockquote>
