BSD is a permissive license. It's only stipulation is that you respect the copyright holder's copyright notice, and that you include the disclaimers. So the intent of the BSD license is to be as unrestrictive as possible. Choosing it means you choose to make your code public for any purpose (short of outright theft), and that you basically understand that your code is going to be copied and used everywhere, which is kind of the whole point.
But the license nevertheless does say that you must include the copyright notice with your redistribution. So what should you do? Well, you should probably do what the license says. However...
By way of illustration, I'm going to pick on Dapper for a moment, Sam Saffron's1 brilliant object-relational mapper that drives the Stack Exchange network. I willingly give Sam permission to slap me upside the head if I get this completely wrong, but here goes.
The heart of Dapper is the SqlMapper
class. Everything else in Dapper is window dressing and additional features. Within the SqlMapper
class is a bit of code that looks like this:
private static readonly System.Collections.Concurrent.ConcurrentDictionary<Identity, CacheInfo> _queryCache = new System.Collections.Concurrent.ConcurrentDictionary<Identity, CacheInfo>();
private static void SetQueryCache(Identity key, CacheInfo value)
{
if (Interlocked.Increment(ref collect) == COLLECT_PER_ITEMS)
{
CollectCacheGarbage();
}
_queryCache[key] = value;
}
What is this _queryCache
they speak of? What is its purpose? Is there really a custom, reference-counting garbage collector in there?
Now of course, I could just link to the SqlMapper class directly, which I will do anyway because I'm a nice person and I want to be polite and respect Sam's work. But isn't it also nice that I included the specific bit of code that I was talking about, and not "look at lines 62 to 70 in the file I linked?"
Should I include a copy of the license in this post, or at least the preamble? (It's the Apache 2 license, so it works a little differently) Probably. Am I going to?
No. Here's why:
If it were my work, I wouldn't expect people to have to include the entire BSD license to point out a few lines of my code in a Stack Overflow question.
Nor would I expect people to ask me for permission. It costs you and me more time and effort to ask and answer that question than it does for me simply to assume you're acting in good faith.
Of course, if you decide to copy the entire SqlMapper
class into a blog post without so much as crediting Sam or linking back to his Github repository, I think he would be at least a little bit put off by that.
The purpose of redistribution2 clauses is that, if you're going to write your own program and copy my work into it, then you ought to do the decent human-being thing and include my copyright notice so that I can at least get a bit of recognition instead of claiming all of the glory for yourself, and to preserve the disclaimer protections.
1Sam Saffron is the original author, AFAIK. There are several contributors, including Marc Gravell, Nick Craver, and invalid-email-address, to name just a few.
2The BSD doesn't specifically define the term redistribution, but I think it's generally fair to say that redistribution means "incorporating all or a substantial part of a library or its source code into a new program, thus creating a derived work, and then distributing that derived work to others."