copyright software
Is it okay to upload a code &#39;based&#39; on the book?
<p>I would like to upload a code based on the book.
In other words, there is no code, but explanations or pseudo code, in the book, and I would like to upload a code based on those and some simple explanation on Github. </p>

<p>Would that be okay? What license should I use with the code?</p>

<p>If I chose a wrong page to ask such thing, please let me know.</p>

<p>This will depend on the details of the situation. If the book is a programming text, or something of the sort, which explains how to write particular kinds of code, and you wish to implement its examples, there will be several considerations. </p>

<p>First of all, facts cannot be copyrighted, it is a fact that a particular code construct  works in a particular way. (Say a for/next loop, or a call to a method of an object). Publishing code that displays such a fact is not an infringement of copyright.</p>

<p>However, if the specific examples in the book are developed in enough detail to be original, and are not simply an obvious way that any skilled programmer would be likely to use to perform the process being described, or to exercise a language feature, then the detailed sequence of operations is protected by copyright, and translating it from pseudo-code into actual program code would be creating a derivative work. That generally requires permission from the copyright holder (often the author, but not always).</p>

<p>There can be an exception to copyright for "fair use" (under US law) or "fair dealing" (under the laws of some but not all other countries). If this is for educational purposes, that tends to favor a decision that it is fair use. But if an extensive amount of code is involved, and it is a significant part of the content of the book, that would probably not be fair use.</p>

<p>Next, the title of the book might be a trademark. If it is, labeling your code with that title might be trademark infringement, or the trademark owner might claim that it is. If you are not charging for access to your code, nor using it to advertise some mother product or service, and if you make it very clear that your work is not sponsored, endorsed, or authorized by the authors or publisher of the book, there is probably not a problem with trademark infringement.</p>

<p>Finally, none of these issues would be a problem if you obtained permission. The original author, or whoever the author might have sold or given the copyright to, could grant permission. But the copyright holder might refuse, or want to charge a fee, or want to right to review and approve your code first. The copyright holder can set whatever terms s/he pleases, and you can accept or not. If you do not accept, you do not have permission. If you ask and get no answer, you do not have permission. The same applies to asking for permission to use a trademark. The holder can grant it or not.</p>

<p>If you want to release the code you write under a free license, or open source license, you may do so, if it does not infringe on the rights of the copyright holders of the book.  You may choose whatever license you wish, to serve your purposes. If the book was released under some license, and you are relying on rights granted by that license, you must comply with its terms. This may require that you use the same or a compatible license, but that depends on what license, if any, the book was released under. The default is "no license" when none is stated, or call it "all rights reserved". </p>
