intellectual-property licensing
What&#39;s considered fair-use when using somebody else&#39;s code as reference when coding your own product?
<p>We have a product that uses a third-party chrome extension. Our clients would like extra features on the extension so we reached out to the developer for a collaboration, to which he politely turned down.</p>

<p>Now it's up to us to develop our own extension as a replacement. As a relatively inexperienced developer, I'm studying the guy's code and using it as a reference to build our own extension. Because his code is much more dry and elegant, and that I'm learning many new concepts and programming techniques by referencing his code, I'm worried that much of our code will be too similar despite that we'll have some different features.</p>

<p>Not sure if I'm making sense, because the way he wrote the code is more polished and cool, much of what I'm learning from him is the only way I know how to write certain parts. So I'm concerned about the legal side of this. If it helps, we're not exactly in direct competition, we're just taking back the clients we sent to him.</p>

<p>The ideas involved in his code aren't protected, but if you use his code as a basis for your code, you have created a "derivative work" that is a copyright infringement unless a defense applies.</p>

<p>While there is a vast amount of case law on the defense of fair use, in general, there isn't much law that specifically addresses your concern - fair use in the context of software code that is admittedly a derivative work. This is a problem because a fair use analysis is a very fact intensive inquiry, so only cases that are quite similar factually provide much guidance to you.</p>

<p>The term "fair use" is totally inappropriate here. You can use a claim of "fair use" if you infringe on someone's copyright, and you believe that you only infringed to a small degree and you had a an acceptable reason to do so. But a "fair use" defense means that you <em>did</em> infringe on someone's copyright. </p>

<p>What you should try to do is to create your own software without committing copyright infringement. It's absolutely fine to read someone else's code (if you have legal access to it) and learn from it. It's absolutely fine to use someone else's ideas. What you mustn't do is <em>copy</em> their code. </p>

<p>I'd recommend that after learning from whatever sources, you start your own code from scratch and write it without any further reference to this source code. </p>

<p>What worries me very much is your comment "we're not exactly in direct competition, we're just taking back the clients we sent to him". In other words, you're in direct competition. Depending on the country where you are, this can get you into trouble. </p>
