licensing software legal-terms open-source-software
Viral nature of open source licences
<p>I find the various licenses for open source software confusing. If a license is not <a href="https://en.wikipedia.org/wiki/Copyleft" rel="nofollow">copyleft</a>, like MIT, does that mean a person can change one small piece of code and patent it and sell it as their own? If a license is copyleft, like GNU General, does that mean you can't use your own code in the future when you want to include it in a commercial closed source product?</p>

<p>In <a href="http://choosealicense.com/licenses/" rel="nofollow">this comparison</a>, does "Same License" refer to copyleft?</p>

<p>First of all, you can't patent computer code, only inventions. The IP for code is copyright.</p>

<p>You <em>always</em> own the copyright in literary and artistic works (including computer code) unless they are "works for hire" (i.e. you are working for someone and creating it is your job). You can sell the copyright if you like in which case you have no further interest in it. Alternatively, you can licence it, in which case you still own the copyright (and can do whatever you want with it) while the licencees must follow the terms of the licence.</p>

<p>To know what you can do with a piece of code that is not yours you must read the licence and do what it says.</p>

<p>If you use MIT licenced software then, yes, derivative works can be "closed".</p>

<p>For the GNU General, if you are making a derivative work then you must distribute it under same licence so, yes, the code must be "open". However, if you write code from scratch and distribute it under GNU General you can still use that code as the basis for a "closed" project because its your code which you allow others to use.</p>

<p>In the comparison, the "same license" means the "same license" or one that grants equal rights, including but not limited to copyleft.</p>
