On mySimon: Stephen King - Salem's Lot
BNET Business Network:
BNET
TechRepublic
ZDNet

June 14th, 2006

HOWTO: Pick an open source license (part 1)

Posted by Ed Burnette @ 6:09 am

Categories: Commercial, Eclipse, General, Java, Licenses, Patents, Programming

Tags:

Update: Part 2 is now available. [More updates were made to this article on 22jun06 to clarify a few things based on reader comments. -ebb]

You’ve made the decision to release your code as "open source". Ok, what does that mean, what is an open source license, and how do you pick the right one? This question comes up all the time so I thought I’d write up a simple decision tree to try to explain the choices.Many people use GPL without realizing the implications or understanding the other options. This isn’t legal advice, and I’m not a lawyer, and I’m probably over-simplifying some of the points, but I hope you find it helpful.

First of all, if you write some code, it’s your code and you get to decide how other people can use it. Period. Nobody but you can say how your code can be used, either by putting restrictions on it or taking them off, without your permission. That’s a very important point to keep in mind while reading this article. 

The second point to keep in mind is that nobody but you can even use your code unless you explicitly give them permission. Another way of saying this is that all source code is closed and proprietary and off limits until you, the author, open it. 

Note: The text of all the licenses mentioned here can be found at opensource.org

Decision 1: Do you want to relinquish any control over how your code is used and distributed?

If yes, then don’t copyright it, and don’t license it. Put it in the public domain, and you’re done. This is a good choice for examples, templates, and other illustrative code where the whole point is that you want everybody to feel free to use what you’ve written. [Alert readers pointed out that "public domain" is is not a good choice because in many jurisdictions you can't give up your copyright. Use a liberal license like MIT/BSD instead. -22jun/ebb]  Example: code listings in a book or article.

If no, then Copyright the code (paste copyright notices all over it) and continue with decision 2. 

Hint: Just to make sure your intent is clear, either put in explicit copyright notices, or put in explicit notices that the code is in the public domain. Copyright is how you retain control. Without a copyright, there is no control. [Technically the notices might not be necessary but they don't hurt and are still recommended. -22jun/ebb]

Decision 2: Do you want to allow people to use your code in non open-source programs?

If yes, then continue to decision 3.

If no, then release your code under the GPL, a restrictive "free (libre) software" license that actively promotes user choice at the expense of direct commercial interests. For the most part, GPL’d code can only be used with other GPL’d code, and in fact if you start using [and distributing -22jun/ebb] some GPL code in a program you wrote then you either have to release your program under GPL as well or quit using that code. This is why GPL is sometimes described as "viral". Examples: Emacs,  Linux kernel.

Hint: Don’t take this choice unless you really mean it. Many people use GPL without realizing the implications or understanding the other options, and thus lock the code away from a whole segment of potential users, so please read the rest of the choices first. 

Decision 3: If somebody uses your code in their program and sells their program for money, do you want some of that money?

If yes, then you have two choices. The first choice (3a) is not to release it as open source at all, i.e., use closed source and you’re done. This would preclude anyone from using your code in free (no cost) packages. And it would only allow people to use your code in commercial programs if they came to your first and worked out a deal for a commercial license. Note that even if the source is "closed" you can give permission if you like for certain people to have access to the source and use it in limited ways. Example: Microsoft Windows, Sun Java (sort of).

The second choice (3b) is dual license. I’ll talk about licenses more in a moment, but dual license just means you give permission for people to use your code under two or more licenses. You pick one license (probably GPL) for free (no cost) programs, and one for commercial ($$$) programs. This is a good choice if you’re trying to make a living off licensing fees for the code itself. Examples: MySQL, JBoss, SleepyCat. Continue to decision 4.

If no, then give permission for others to use your code under one or more "commercial friendly" licenses. This is a good choice if you want your code to get into as many hands as possible and either you don’t care about the money or you plan to make money in other ways, for example by selling your own programs that use the code or from consulting or support. Examples: Apache HTTPD, Eclipse, Firefox. Continue to decision 4.

Decision 4:  If somebody uses [and distributes -22jun/ebb] your code and improves it (fixes bugs or adds features) do you want to make them give you the improvements back so you can use them too?

If yes, then use a "reciprocal" license. Any modifications to your code need to be made available under the same licensing terms as your original code. This is useful if you’re worried somebody will take your code and go off on their own private "fork". Examples: Eclipse (EPL), Solaris (CDDL), and Firefox (MPL). Done.

If no, then use a non-reciprocal license. Often times the people using your code will send back improvements anyway, especially if you have a history of frequent releases and they get tired of having to re-merge in their changes every time. This is the most wide open type of license so it will get you the most exposure and users, but it can also relegate the original writer(s) to the sidelines. Example: FreeBSD (BSD).  Done.

In a follow-up article I’ll explain how the most commonly used open source licenses fall in the categories like "commercial friendly" and "reciprocal", and address any concerns raised by commenters. So whether you agree or disagree with my points above please give me some feedback in the talkback section.

[Note: this is just intended for informal, simplified, educational purposes. It is not a substitute for advice from a qualified legal professional. -22jun/ebb] 

Ed BurnetteEd Burnette is a professional developer and author of several articles and books about computing including Hello, Android: Introducing Google's Mobile Development Platform, 2nd Edition. For disclosure of Ed's industry affiliations, click here or to view his full profile click here.

Email Ed Burnette

Subscribe to Dev Connection via Email alerts or RSS.

  • Talkback
  • Most Recent of 34 Talkback(s)
Making revenue from open source
Nice article, thanks..

On a slightly tangential note, making revenues from free & open source software is one of the most frequently asked questions these days. While there have been a few succ... (Read the rest)
Posted by: ecacofonix Posted on: 07/26/06 You are currently: a Guest | | Terms of Use
Correct me if I'm wrong  Michael Kelly | 06/14/06
Depends on the committer agreement  Ed BurnetteZDNet Moderator | 06/14/06
open source languages  chaves@... | 06/14/06
Fixed, thanks  Ed BurnetteZDNet Moderator | 06/14/06
Disagree with "hint"  b3timmons | 06/14/06
GPL MAY be safe to use...  johannes@... | 06/15/06
Nonsense  noahslater | 06/15/06
For legal documents: Hard to interpret = bad  johannes@... | 06/16/06
Re: Hard to interpret = bad  Ed BurnetteZDNet Moderator | 06/16/06
"Anti-GPL tone"  toadlife | 06/20/06
Public Domain  johannes@... | 06/15/06
Creative Commons?  noahslater | 06/15/06
Debatable  Ed BurnetteZDNet Moderator | 06/16/06
The GPL is about freedom - not locking people in  noahslater | 06/15/06
GPL is reciprocal, but  Ed BurnetteZDNet Moderator | 06/16/06
Reader beware!  b3timmons | 06/15/06
Looks like they mostly agree with me  Ed BurnetteZDNet Moderator | 06/16/06
Thanx for contributing b3timmons. After all....  yogeee | 07/01/06
dual licence  TheUglyOneWithTheJewels | 06/16/06
JBoss  Ed BurnetteZDNet Moderator | 06/16/06
Creative Commons License  johannes@... | 06/16/06
For software?  Ed BurnetteZDNet Moderator | 06/16/06
Please be more precise!  b3timmons | 06/18/06
Sloppy language in this forum!  b3timmons | 06/18/06
Spirit vs. letter?  Ed BurnetteZDNet Moderator | 06/18/06
You shouldn't write blogs like this if you don't understand the law  rhavyn | 06/21/06
Sigh  Ed BurnetteZDNet Moderator | 06/21/06
Your words, not mine  rhavyn | 06/21/06
Not incorrect or contradictory  Ed BurnetteZDNet Moderator | 06/21/06
Do you read what you write?  rhavyn | 06/21/06
I liked it.  mobrien_12@... | 06/21/06
Thanks  Ed BurnetteZDNet Moderator | 06/21/06
Updated version available  Ed BurnetteZDNet Moderator | 06/22/06
Making revenue from open source  ecacofonix | 07/26/06

What do you think?

SponsoredWhite Papers, Webcasts, and Downloads

advertisement
Click Here

Recent Entries

Archives

Favorite Links

ZDNet Blogs

White Papers, Webcasts, and Downloads

SmartPlanet

  • Thought-provoking progressive ideas on diverse topics that intersect with technology, business, and life, and matter to the world at large. Visit SmartPlanet
  • More from IBM
  • Innovate your business' process model, play against the market, compete against others on our scoreboards and WIN! Try INNOV8 2.0: A BPM Simulator
  • Enabling Real-World Business Transformation through IBM Service Management Read the EMA Analyst Report
Click Here