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.