farmdev

Why you should NOT license your code as GPL

Zed Shaw recently wrote a clear and concise defense for why he used the GPL on Lamson. I've seen a few mentions on twitter that alarmed me because people seemed to think now is the time to release all software as GPL. Here's what you need to ask yourself before you license your code as GPL. First, do you have a business plan that involves selling your software? Most people do not, most business plans have to do with actually using custom software. If that's you then your software and your business become better as more developers work on your software. I.E. when your software is applied to more real world situations, more bugs are fixed and more patches for features are received. GPL does not help you gain users because it shuts out most commercial enterprises.

Zed Shaw argues that without a GPL license a startup business might use his code and not pay him anything for it because startups do not like paying for things. This is probably true. But most startups are not too strict about code ownership -- that is, their developers are typically free to contribute to open source projects, unlike developers at big companies like Apple where code you write for your blog at home on your couch is owned by Apple. Zed Shaw's strategy is to shut out the startups and any other commercial (closed source) entities unless they pay for his code. That's great for him because his business is in selling code (similar to how ExtJS sells its code, maybe?). That's not so great for your project if you want patches from said benevolent startups :) Please consider using the BSD, MIT, Apache 2.0, or a similar license for your code if you are not trying to sell your software. More people will use it, your software will get patches, and you will get more bug reports and bug fixes.

Take Django as an example of a successful open source project that is distributed under the BSD license. Would you fork Django, pay them nothing, take all the credit (except for copyrights)? Well, you could do that but you never would and here's why. As soon as you fork Django, the main line of Django will get better and it would require more work from you to keep up with all the improvements made to Django. I'm not saying Django is perfect but it is very popular and has gone from a mediocre 0.96 release to a stellar 1.0 release in a small amount of time. Why? Because many different people, including those who might even use Django for commercial purposes, are relying on the fact that Django is a rock solid product; they are contributing their expertise to test and report bugs and possibly implement new features. So before you hinder the success of your own project by making it GPL consider all the commercially employed developers out there who are of the benevolent kind, the kind who give you patches ... for free! I don't have empirical evidence but I'd bet that most developers, when working in a corporate environment that supports open source collaboration, are motivated enough to contribute patches or at least report bugs.

Let's go back to Apple for a minute. Specifically, Apple's open source browser engine, WebKit. That was a fork of KHTML and now they have more or less merged. Guess what? Apple was forced to release that fork as open source since KHTML was licensed as LGPL. LGPL is a little different than GPL but my point is that you do run the risk of a company forking your code and making it closed-source when you use a BSD or similar license. You need to be aware of this risk when not using a GPL license but it's really not so scary when you consider the case of Django and any other successful project. There is not much incentive for a company to fork and privatize your code unless they are doing something very specific to their business (that no one else would benefit from anyway) or your software literally prints money or something amazing like that.

OK, so if you use the GPL does that mean you are protected from evil corporations and that no one will fork your code and steal away your business? No! Take the MySQL database for example, licensed under the GPL. There is a fork of it called Drizzle. I'm not saying Drizzle will ruin all the business made out of MySQL, which is a very big consulting business, but it certainly could, I suppose. Open source software is effective because it puts software in the hands of more developers then you could afford to employ. A license like GPL stifles this kind of growth so be careful. It may not be what you want.

If you've read this far and would like a more succinct explanation of the GPL's limitations with a good intro explaining open source licenses, see this article.