copyright software
If I obfuscate someone else&#39;s source code, can I avoid copyright infringement?
<p>I know the answer is probably no, but I'm confused about something. The underlying algorithm is never copyrightable. So as long as you "learn from the code" someone else has wrote, and re-implement it,  you are allowed to reuse what you learned. But isn't this the same as making a few changes to the source code, i.e. reordering things, changing names etc.? So does this mean running source code through a code obfuscater would avoid copyright infringement issues? I know it's a strange question, but I'm serious. </p>

<p>I'm talking about small portions of code, less than 100 lines, not whole programs. </p>

<p>I ask this question after having read <a href="https://law.stackexchange.com/questions/4097/does-copyrighted-code-protect-intellectual-property-rights-on-novel-algorithms-i">Does copyrighted code protect intellectual property rights on novel algorithms it implements?</a> and <a href="https://law.stackexchange.com/questions/23877/algorithm-pseudocode-in-academic-papers-what-is-the-copyright-license-statu?noredirect=1&amp;lq=1">Algorithm (pseudo)code in academic papers -- what is the copyright/license status?</a> </p>

<p>No, it's still copyright infringement. When you modify a copyrighted work in any way, you generate a <a href="https://en.wikipedia.org/wiki/Derivative_work" rel="nofollow noreferrer">derivative work</a> which you are not allowed to distribute without the permission of the original copyright holder.</p>

<blockquote>
  <p>So as long as you "learn from the code" someone else has wrote, and
  re-implement it, you are allowed to reuse what you learned. But isn't
  this the same as making a few changes to the source code, i.e.
  reordering things, changing names etc.?</p>
</blockquote>

<p>Not, it is not the same. In practice, to make your re-implementation not infringing copyright, it needs to be written <em>from scratch</em> without copying the original code.</p>

<p>It might be indeed difficult to write an implementation of a fewer than 100-lines algorithm that would not look copied and re-shuffled original. But if you do it as if you have never seen the original but have been taught the algorithm only, you'll make it. A definitive way to make it is to explain the algorithm to somebody else who won't have access to the original, and ask them to code it.</p>

<p>So, to avoid doubt, running code through a code obfuscater will produce <em>derivative work</em>, which means copyright infringement issues cannot be avoided this way.</p>

<p>The copyright holder has the right to state who is allowed to copy, and who is allowed to modify their creation to create derived works. All the actions you talked about <em>modify</em> the original source code. Including the source code obfuscator, which is modification on a huge scale, but nevertheless just obfuscation and therefore not allowed without permission by the copyright holder.</p>
<p>What you are allowed to do, is write a program from scratch, not using anyone else's code, and implement someone else's idea.</p>
<p>Now in practice (that is if you are taken in court), a judge or jury has to decide whether your work is a derived work. You might think that a code obfuscator hides the evidence - but this would be in a civil court, and the court only has to decide what is more likely. With obfuscated code, it's obvious there must be some code that you obfuscated, so you will be asked to show that code. If you show the code, it will be found that it was derived, if you don't show the code the judge will assume that you are not showing it because you know it is derived.</p>
<p>And it is recommended that you find someone to write <em>your</em> code who has never seen the original code. Because then you can say in court &quot;I swear I didn't modify the original, but more, I couldn't have modified it even if I wanted&quot;. It's not a matter what you are allowed to do, but how to prove you didn't do anything wrong.</p>
