License for sample code
Andy on Sep 5th 2007
I’ve received a few inquires about the licensing for the sample code that I’ve presented in the “how to implement…” graphics articles. I thought it might be prudent to cover that here publicly.
The intent of the articles and sample code is to increase the public knowledge of how tools in bitmap editors work. It appeared to me that every author of a graphics editor had to go out and reinvent the wheel somewhat, simply because not all the basic tools were publicly documented. The sample code is intended not only to satisfy idle curiosity, but to improve graphics editors, specifically for the Mac. i.e. I’m hoping to see Mac graphics apps with these features, if they don’t have them already.
To that end, the license needs to be permissive, so that it can be used in a wide variety of applications.
Privately, I think of the sample code as public domain. Optimally, that’s how I’d want it. However, because of the copyright laws in the US, it’s very difficult to make it so.
Instead, I’ve chosen the MIT license, which will hopefully be lenient enough:
Copyright (c) 2007 Andrew Finnell
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
If you’d like to use another license, just let me know. In general I grant permission to use the code in any application, whether it be open source or closed.
One final note: since I’m writing the articles with the hope that some of the tools will wind up in real applications, I’d like to know if they do. If you use some of the code here, I would appreciate it if you would shoot me an email letting me know. This isn’t required, but I would be grateful.
Filed in Macintosh, Programming | 5 responses so far

University Update - University of Minnesota - License for sample code Sep 5th 2007 at 02:55 pm 1
[…] University of Wisconsin License for sample code » This Summary is from an article posted at Safe from the Losing Fight on Wednesday, September 05, 2007 This article’s contents are copywritten by the author of Safe from the Losing Fight. Please click "View Original Article…" below to view the article. Summary Provided by Technorati.comView Original Article at Safe from the Losing Fight » 10 Most Recent News Articles About University of Minnesota […]
Joe Morrison Sep 5th 2007 at 03:00 pm 2
I’m a little curious as what you are seeing as the difficulty in placing your code in the public domain? I would think that a statement such as “This code is authored by Andrew Finnell and contributed to the public domain” would be adequate notice.
Andy Sep 5th 2007 at 03:27 pm 3
Well, I’m not sure if that is actually sufficient. The problem is that I’m not a lawyer. The wikipedia entry for public domain has some interesting excerpts:
And then later on:
It sounds like there isn’t a clear way to mark something as public domain. On the other hand, it’s pretty trivial to attach a very permissive license, such as the MIT license, to a piece of code. But once again, I’m not a lawyer, so I could very well be wrong.
Pieter Omvlee Sep 6th 2007 at 12:28 am 4
When I asked about using the code, I had no legal problems in mind, but just thought it polite to ask …
Funny I didn’t think about that.
Markus Prinz Sep 6th 2007 at 05:05 am 5
Another advantage of the MIT licence over public domain is that most european countries don’t have a notion of “public domain”, i.e. it is impossible to give away your copyright, even if you wanted to.