Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am working on project on which I need to open-source part of my code in order to simplify extension by the enduser.

What I want, is to make an npm module, that will expose part of my code, so my users can build extensions for the product (in JavaScript), but I want a guarantee that this code will not be used for commercial or other development work, beside extensions for my product.

I found Creative Commons Attribution NonCommercial NoDerivs license to be a fit.

My problem: Can I, as the author of this code, use it in a commercial closed-source application?

Disclaimer: I know this is kind of a legal question, but please, state what you think, no one is holding you accountable/liable for it. Thanks.

share|improve this question
4  
did you (have a lawyer) read the full text of the license? –  ratchet freak Mar 13 at 13:30
2  
Did you read the disclaimer? –  Nikolay Tsenkov Mar 13 at 13:32
1  
Still doesn't answer if you tried to understand the license yourself. –  ratchet freak Mar 13 at 13:33
4  
@Gnat It's not an opinion. There is a clear and discreet answer. There is also additional surrounding information that Nikolay should probably know along with it. Which makes stackexchange a useful place to ask. And Rachet, you don't need a laywer to tell you the basics of copyright. Seriously guys, stop driving people away. –  Philip Mar 13 at 16:49
5  
@gnat. If you ask the question "does 1+1=3?" tacking "please state what you think" on the end doesn't make it an opinion-based question. He's just being nice. –  Philip Mar 13 at 17:02

5 Answers 5

up vote 34 down vote accepted

Copyright licenses only specify what others can do with your code. If you are the copyright holder of the code, then you have all the rights to do with that code as you like and that includes using the code in ways that is not permitted for others.

You are the copyright holder if you wrote the code yourself and it was not written as part of your job or under contract.


Regarding your choice of license: Using Creative Commons licenses for software is not recommended.

share|improve this answer
1  
Thanks. While it's not recommended, from this text I think the main reason is compatibility with other open-source licenses. But since it pretty much removes all the rights on commercial use and development, I guess it should be ok to use it. Still, I'll try to find something else. Thanks again. –  Nikolay Tsenkov Mar 13 at 13:43
2  
@NikolayTsenkov actually, that CC license isn't compatible with many open source licenses is that you can't limit what you do with it for the definition of an open source license (neither the NC nor the ND are compatible with BSD, MIT, or GPL). –  MichaelT Mar 13 at 15:10
8  
@NikolayTsenkov: None of the CC licenses are recommended for software. Your "No derived works, non commercial" requirements are incompatible with the open-source ideas. You will need a closed-source license. –  Bart van Ingen Schenau Mar 13 at 16:29
    
Thanks a lot, guys, it's probably a topic for a separate question, but if you think you can point me into the right direction (any suggestion for a fit to my requirements would be awesome), please, do so. Thanks. –  Nikolay Tsenkov Mar 13 at 20:22
    
I have posted a new question for the type of license I am searching for: programmers.stackexchange.com/questions/232400/… –  Nikolay Tsenkov Mar 14 at 17:04

Can I, as the author of this code, use it in a commercial closed-source application?

(Well the author and the copyright holder are not necessarily the same thing. An author may not own the copyright in the first place (e.g. employees writing code), or he / she / they may assign the copyright to someone else.)

So:

  • If you are the current copyright holder - Yes. See below.

  • If you are working for the copyright holder - Ask the boss.

  • If you have assigned the copyright to someone else - It depends ...

    • The license forbids this, because what you are doing is commercial use.

    • However, it is common practice to include a "license back" in copyright assignment agreements. So check to see if that applies, and what right are being granted by that route.

Copyright-based license are actually a grant of limited rights by the copyright holder to others. If you are the copyright holder, you don't need to grant yourself rights that you already have.

IANAL ... obviously.

share|improve this answer
    
Thanks for the clarification, that's exactly how I think it is. As for the "IANAL" - Noted! :) –  Nikolay Tsenkov Mar 13 at 13:46
2  
Why are you using CopyLeft instead of CopyRight? CopyLeft is usually used for the "viral" copyright licenses: gnu.org/gwm/libredocxml/x53.html –  Marjan Venema Mar 13 at 14:13
    
If you've assigned the copyright, you (in most jurisdictions) have done so rather explicitly. Often even on paper, spelling out the terms. So, the second sentence should be, "If you have assigned the copyright to someone else, see that contract". It is certainly not unusual to retain a private-use non-transferable license. –  MSalters Mar 13 at 22:29
    
@MarjanVenema - I've corrected that. Thanks –  Stephen C Mar 13 at 22:32

Bart and Stephan's answers are correct: YES, as the copyright holder, you can do whatever you want with it.

ADDITIONALLY:

You're looking for a license "to simplify extension by the enduser." Insomuchas you're making a module that exposes some of your code for them to manipulate.

Are you sure you don't simply need to make an API for them to interface? They receive none of your code, just some documentation about how to interface with it.

If you expect the end-users to change and update this module, then yes, an open-source license is a good idea. But this CC-NC-ND license is not a good idea because of the ND portion. No derivatives means that they cannot change or update the module, which is why you're open-sourcing it in the first place.

This CC-NC-ND license is more for artists rather than coders. They can look at the code, but can't touch it. If you want end-users to contribute code to your project, go with another open source license.

share|improve this answer
3  
IANAL, or even very extensively read on the subject, but my reading of ND is that you can't even compile it and distribute the compiled form (as a piece of your larger project), because that is considered a derivative work. –  Bobson Mar 13 at 17:26
    
Thanks Philip. I really don't need to release the source, but I would like to go an extra mile for my eventual users and make their extensions testable without my application, so they can create github repos, add continuous integration and so on. Since I am doing this with node, npm is what I think they will expect, so I try to give better experience, but at the same time to protect my one-man-show. :) Thanks to you, too @Bobson, I will definitely search for an alternative. –  Nikolay Tsenkov Mar 13 at 20:29
    
@Bobson IANAL, but I don't believe that a compiler creates a derivative work of the original source in that a derivative work requires some additional creative element to it that could be copyrighted itself. The mechanical transformation of one format to another doesn't constitute a derived work. Note that change mechanical change of format [link] is allowed even with ND. –  MichaelT Mar 13 at 23:33
    
@MichaelT IANAL, but I feel quite sure a binary built from source code is a derivative work of the source code. Who is to say what improvements or alterations (in this case totally changing its form, so it actually runs) involve an "additional creative element." Also, taking something out makes a derivative, and a binary takes a lot out--it's hard or impossible to get the original source back. Also, imagine a binary compiled from CC-NC-ND source were not considered a derivative. Suppose you licensed me a binary (no source). Could I distribute source code I obtained by decompiling it? –  Eliah Kagan Mar 14 at 0:11
    
@EliahKagan A scan of a photograph is not a derivative work. If I licensed a digital image of a photograph I scanned to you under CC-NC-ND, you could take that image, print it out and continue to distribute that printed image it under CC-NC-ND without violation of the license. Under copyright law, photo -> .jpg -> printed is probably the same as source -> .bin -> decompiled. Each is a mechanical translation of the previous format. That said, this should also serve to highlight why the CC licenses are not good choices for software because the legal questions haven't been settled. –  MichaelT Mar 14 at 0:16

Licence isn't some property of code, it's a [offer of] contract between you and somebody else, where you grant them licence to use your copyrighted item under some condictions.

First, you may do whatever you want with the code as long as it's only yours.

Second, any piece of code may have multiple licences attached to it depending on how and to whom the author has distributed it. You may have the exact same code with one licence available to everyone, with another (more permissive) licence to people who pay you money for those extra permissions, and a completely different licence to a single specific company. The permissions depend your relations/agreements with the other party, not only on the code itself.

Third, for any licence of any code, it's conditions apply to you only if you need the licence to grant you some permission - i.e., if you want to modify&distribute something where someone else owns the copyright. (Or you have a specific signed contract, but that's more common in B2B enterprise issues). If you want to do something where you don't need permission - the licence doesn't [need to] apply.

Fourth, for software do note that many things change if multiple people are authors of parts of it - e.g., if other people make small improvements and want to redistribute the combined project. Then the result is not your code anymore (e.g., it's not 100% yours), and in order to make it work, you need to take a look at the software-specific licences (not the creative commons family) which handle those issues as well.

share|improve this answer
    
Thanks @Peteris, this is a very nice and detailed explanation. Sorry I can't vote, yet. –  Nikolay Tsenkov Mar 13 at 20:33
2  
+1 for "Licence isn't some property of code", that's exactly what I was planning to answer and you saved me the trouble. –  Steve Jessop Mar 13 at 22:09

Besides what has been written so far, I think it is important to add that CC licenses are non exclusive, as most other open source licenses. As hinted by Peteris, this means that as the copyright holder you can license your work under a CC license and some other commercial license of your choice (as long as that one isn't exclusive either). This is in fact a pretty common practice known as multi-licensing.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.