26
$\begingroup$

Developers of software have the choice to choose an appropriate license in accordance with the goal(s) of the work.

Can anyone give some recommendations/experiences on which license to pick for software?

What are the pros/cons of "giving away" all the coded work as open source codes?

How to deal with industrial players which would like to benefit from the research code?

$\endgroup$
  • $\begingroup$ Good question, I was wondering about it as well. $\endgroup$ – milancurcic Dec 13 '11 at 19:47
  • $\begingroup$ This is not relevant to this site. I would recommend posting to something like Stack Overflow. $\endgroup$ – aterrel Dec 13 '11 at 22:46
  • $\begingroup$ I just want to correct Matt's statement that GPL/LGPL licensed software cannot be used commercially. It can too! GPL licensed software can be used for anything a commercial entity want, they just can't create a derivative software product and sell (distribute) that as closed source (which should be enough if the commercial entity is not a software company). The LGPL is more permissive and allows selling closed software products that link to the original library. I agree with Matt that industry are afraid to touch GPL software but it's based on a misconception of the GPL. We originally used $\endgroup$ – Anders Logg Dec 14 '11 at 8:12
  • 1
    $\begingroup$ I disagree. A lot of people invest a lot of time and hard effort in developing new code bases for challenging problems in computational science. As a part of this effort it can be useful to have a strategy for sharing the work with others. $\endgroup$ – Allan P. Engsig-Karup Dec 14 '11 at 20:12
  • 2
    $\begingroup$ Yes and a lot of computational people spend time cooking, but cooking is off topic here. There are other stacked exchange for basic software issues. $\endgroup$ – aterrel Dec 14 '11 at 21:15

10 Answers 10

18
$\begingroup$

Can anyone give some recommendations/experiences on which license to pick for software?

Which license you chose will depend on how free you want your code to be, but free means different things to different people.

  • For proponents of permissive licenses, free means allowing people now to use the software however they want to right now, not worrying about how free future derivation are.
  • For proponents of copyleft licenses, free means ensuring that the software and any derivation of it stays free, being prepared to sacrifice some immediate freedoms to ensure that.

The more permissive a license is, the more people will be able to use it, but the less control you have over it. The more restrictive it is though, the more likely you are to put people off using your software in the first place.

There are a number of free and open source licenses out there, including GPL <=2, GPL 3, LGPL, BSD, Eclipse and so on. There are pro's and cons to each, so read up on what restrictions they place on the code and decide who you want to be able to use it. Warning, whichever you choose someone will complain - this is holy war territory.

Overall it is a subtle balancing act, and it depends very much on the target audience for your software.

  • A great resource for determining which license is the right license for you is the very comprehensive, interactive license differentiator, from Oxford Universities OSS Watch.

In my opinion, both permissive and copyleft licenses are appropriate for scientific code - the important thing is that the code is open source in the first place. I believe that Science should be Open, and so should the code used to support that science.

What are the pros/cons of "giving away" all the coded work as open source codes?

The idea of giving away your software is that if others find it useful then they will use it.

If they use it they will find, report and often fix bugs, saving your effort of doing the same.

If they like it and your software does almost what they want, they might enhance your software and contribute those enhancements back.

That's a lot of ifs though.

How to deal with industrial players which would like to benefit from the research code?

Firstly, if you want to prohibit commercial use of your code, you can select a license with a no commercial re-use clause.

Secondly, if you think someone might use your software to power a service, without ever actually distributing the code to anyone else, then you could consider the Affero GPL which plugs that particular copyleft loophole.

Thirdly, you can do the above and offer a dual license option. Offering GPL or AGPL licenses for public download, and commercial licenses for a fee gives you the best of both worlds, and means that you might even be able to generate some revenue from commercial sales of your software which can help support your scientific activities.

Note, if you are going to do this, offer it from the outset - that is likely to cause less friction from your open source contributors than starting to offer commercial licenses later on. If your community becomes popular, you don't want people accusing you of selling out if you weren't straight about the possibility of commercial exploitation later. Ideally you should set up a suitable Contributor License Agreement (CLA) before you start accepting third party contributions into your codebase.

This answer to this question provides some good information on this option too.

$\endgroup$
12
$\begingroup$

PETSc uses this license, which is a less restrictive form of BSD. The crucial difference from GPL, is that the software can be used commercially. Many people have a principled objection to closed software, however in my experience no business will go near your code if it has a GPL license. Moreover, PETSc's industrial users have been incredibly valuable. They tend to run quite complex problems, which most academics would find more difficult than warranted for a publication. They have also contributed a lot of code back to PETSc, so that it would enter the normal support chain. I would advise against any license without commercial use potential, and in fact advocate the least restrictive license possible (you could definitely burn PETSc to a CD and try and sell it to the gullible).

$\endgroup$
  • $\begingroup$ How has the development of PETSc been funded? and how is it supported (through funding) today? How does it work with maintenance of the code base for PETSc? $\endgroup$ – Allan P. Engsig-Karup Dec 13 '11 at 20:17
  • 2
    $\begingroup$ Here is the funding. We have an open repository and many contributors. $\endgroup$ – Matt Knepley Dec 13 '11 at 20:38
  • $\begingroup$ About your statement on GPL code: OpenFOAM is GPL and used widely in industry. The reason is that GPL code only has to be made public if the software is to be distributed. Only businesses that want to sell their code to a wide audience would be affected by the GPL license. $\endgroup$ – akid Dec 14 '11 at 8:12
  • 3
    $\begingroup$ @akid I cannot find information on OpenFOAM users on the website, but I am skeptical of the "widely used" characterization. I can tell you that people from large companies (Shell, Boeing, MS) have stated that the company policy for research code is to never touch GPL. Maybe small companies have more leeway, but larger ones just want to avoid even the appearance of impropriety (looking at GPL code and coding something else). $\endgroup$ – Matt Knepley Dec 14 '11 at 15:11
  • 2
    $\begingroup$ @Tshepang GNOME and Linux are used like office supplies, which will never happen to your scientific code. I mean when you code is used for purposes directly related to the business. $\endgroup$ – Matt Knepley Dec 14 '11 at 15:15
5
$\begingroup$

I use GPL, mainly because of the sentiment to the original open source movement (and thus hope that it will help its spread). Moreover, this is paradoxically a best way to protect your possible earnings from immoral capitalists -- as an author, you can always distribute the code on a different license in parallel and thus maintain proprietary version for a white-label business use.
However, this may be also a con -- your funding source might made a disclaimer that all your work should become public domain, what goes beyond this license.

Anyway, the most important thing in that topic is that any license is better than none, which is unfortunately quite often in the scientific development world -- and I just hate all those /*Stolen from John Smith's program he has never publicized*/ or C I think I saw this in Jane Smith's post on some group in 1995... or maybe 1993?

$\endgroup$
  • 1
    $\begingroup$ Remember, if code has no license then in most countries (which have signend up to the Berne convention) it is still covered by copyright, so cannot be legally used by anyone other than the copyright holder, let alone redistributed. $\endgroup$ – Mark Booth Dec 14 '11 at 0:38
  • $\begingroup$ @MarkBooth That's my point. $\endgroup$ – mbq Dec 14 '11 at 11:03
5
$\begingroup$

First, the pros/cons of going open source:

Pro: more people will use your code, provide feedback, corrections, improvements, etc. You will end up having better code and more people that trust it.

Con: if you ever want to base a business in your code, you have fewer options (but there are still a few, such as selling consultancy services)

As for choosing a licence, I'd proceed in the following order:

  1. Does your employer/grant agency impose anything? Then you don't have a choice. Check this for all contributors to the code.
  2. Do you re-use code that has some particular licence that limits your choice? Then your choices are limited as well. In practice, integrating pieces of GPL-licenced code is the most frequent source of such limitations.
  3. Decide what you value more: the all-code-should-be-open philosophy behind the GPL and similar licences, or the encourage-the-widest-possible-use philosophy behind the BSD licence.
  4. Within each of the two big Open Source licence families, choose according to what is most common/accepted in your community.
$\endgroup$
5
$\begingroup$

Most of my research is funded by public funds, and so I feel an obligation to use the least restrictive license possible. If other people in my country are helping to pay for this research, do I really have the right to tell them they can't integrate my code into a closed source and/or commercial software distribution? I expect that most of the people that use my code will be academic scientists, but I have no philosophical problems with businesses improving my software by integrating it with other (possibly commercial) software, putting a GUI on it, etc, to deliver a product that helps them make a profit.

That being said, I try to use licenses that require proper attribution. For instance, if a company does fold my code into a larger commercial product, I want them to make it clear that my code can be obtained freely from me. But other than that, I want to place as little requirements on users of my code as possible.

For software development that is not funded by taxpayer dollars, I understand that other licenses may be more appropriate.

$\endgroup$
5
$\begingroup$

No one has spelt this out very clearly, so I think it's worth saying:

Some of the open source licenses (notably: the GPL) are "viral" in the sense that whenever the code is used in a new project, the new project must be licensed in the same way. Also, the code cannot be linked to (in certain ways) differently licensed code.

One practical consequence is:

  • I you implement a new numerical method in C, the license will not allow calling it from such common software like MATLAB or Mathematica

  • If you implement a new image processing algorithm, the license will not allow making a Photoshop plugin out of it

  • and so on ...

This will not only prevent commercial re-use, but also convenient re-use by other academics (if they use closed software), and if someone builds on top of your code, it will prevent them from giving their work away in a "do-what-you-will-with-it" way.

This is something you must consider before you finish formulating your license.

I put it this way because I have met people (not very familiar with open source licenses) who were not aware of this, or have not considered it from this angle.


(This is just personal opinion, but I believe that applying such restrictions to work that comes from (publicly funded) academia is not appropriate. So I either keep the code, or I give it away.)

$\endgroup$
4
$\begingroup$

Regardless of what license you choose to go with, remember to carefully check through all your funding agreements to make sure there aren't clauses in them that either dictate or restrict how you might go about licensing your software.

I know in my case many of my projects are built up from several layers of funding, a little bit here and a little bit there, and keeping track of how I'm allowed to license my stuff by the people who keep the lights on and the machines running is fairly complex.

$\endgroup$
4
$\begingroup$

For large bodies of code I go for one of the licences described in the other answers, and usually LGPL. However, although not usually recommended for software, for small self-contained scripts that I may be sending to a colleague in industry I often opt for a Creative Commons licence. This is because they tend to be clearer for the individual that I send the code to, which stops any potential problems of misunderstanding. This has worked out well for me in the past.

$\endgroup$
4
$\begingroup$

Unlike most of the people answering here (who are working in academic and/or public organizations), I am working in the commercial sphere.

For my products, the code is closed and there continue to be major business advantages to doing this. But there are of course other ways of doing it (e.g. as demonstrated by MySQL amongst others). I often see the LGPL + commercial license approach for libraries. I have yet to use such a library in a commercial system, but I would not rule it out (so far I've only used such libraries, eg. ALGLIB, at an R&D level). This contrasts with a GPL product - which I might use internally but would never use in a product, principally due to the viral nature.

When I do release source code (how-to samples, free programs, etc), I typically use the Berkeley license. This seems to be much more in the spirit of "free" code, with attribution but without the GPL strings and politics. Perhaps this is why it (or similar licenses such as the MIT license) are so popular with universities and public organizations. Source code is given away in the true meaning of 'free' (here's some code, do what you want with it) but the author still gets credit/attribution.

$\endgroup$
  • $\begingroup$ I'm not the one who voted this down, and I'd actually like to vote it up as seems you prefer the BSD licence and more detail on why could be interesting. However, it has an issue. The language used is provocative. Exactly the same information can be communicated without the bile, and you'd likely get through to more people with your message. $\endgroup$ – qubyte Dec 16 '11 at 16:41
  • $\begingroup$ @MarkS.Everitt: Other than the comment about the politics, what exactly here is provocative? $\endgroup$ – aeismail Dec 16 '11 at 20:35
  • $\begingroup$ Yeah no bile was intended. My comment on GPL politics is a personal opinion but also an observation - I assumed the down vote was just the kind of politics that turns me off (how dare I criticize GPL and write closed code!) $\endgroup$ – winwaed Dec 17 '11 at 18:07
  • $\begingroup$ Take for example your opening sentence. This is an immediate me vs. you, which is continued in the "Contrary to what..." sentence. It shouldn't matter, but unfortunately it does. It's also a slippery slope for generating arguments, and a young SE doesn't need those. $\endgroup$ – qubyte Dec 17 '11 at 18:12
  • $\begingroup$ The first sentence sets the context of my answer - EVERYONE is writing from their own experiences whether they admit to it or not. Context is important - And I thought it was especially so for me. I'll try to edit the next paragraph but I may just give up and delete the whole thing. I thought I had something useful to say... $\endgroup$ – winwaed Dec 17 '11 at 18:17
0
$\begingroup$

This is an old question, but I think the Mozilla Public License is worth mentioning as a middle ground between permissive licenses (BSD, MIT) and strong copyleft licenses (GPL). MPL code can be used and redistributed, but the MPL code and any modifications to it must be made available. For example, a company can take some MPL code, make their own improvements to it, and distribute it in a proprietary closed-source software package, so long as they make their modified version of the original MPL code available. They're not obligated to release all of their own source code, as they would with GPL.

With the BSD license, there's the fear that a corporation could take your code and improve it without giving back these contributions to you or the community at large, under the rationale that the improvements they make to it confer a competitive advantage. (Matt Knepley's answer suggests that not every acts this way though). On the other hand, many people might avoid GPL code altogether. The MPL avoids both of these potential pitfalls, at least in principle.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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