5

I apologize in advance for what is probably a dumb question, but I'm trying to do this the right way from the beginning.

I'm putting together a coding tutorial site, and my main question boils down to this: how do I allow "good guys" to use my code for whatever they want, but prevent "bad guys" from copying my entire site, slapping a new name on it, and making millions of dollars from it?

I don't want to put non-commercial or share-alike restrictions on it, because that will overly restrict good guys. Want to copy some code that ends up in a closed-source, paid app? Cool.

I'd like to prevent somebody from, for example, scraping my website, rehosting everything, and adding a tiny footnote somewhere sorta-kinda attributing my site.

I know in reality this is not a concern, but I'm curious about any standard approaches to what seems like a common problem.

I've read this question, but the answer seems to admonish the OP for not "really" wanting open source. I do want open source, specifically so students and teachers can freely use my code for whatever they want, including paid or closed-source projects. Similarly, the answers to this question say to use a copyleft license, but I don't want to do that for the reasons outlined above.

Other things I'm considering:

  • I'd like to allow other people to submit tutorials. I'd like to guarantee that I can use those tutorials without becoming a bad guy myself. For example, I could see maybe collecting the tutorials into an ebook or something.
  • There are multiple components to the site: the code (and its resources like image files), and the text (and screenshots of the running code), plus logos and whatnot. Maybe I should use a different license for different resources? That seems confusing though.
  • I'm using GitHub pages, which introduces its own copyright requirements.
  • It would be neat to make my site compatible with Stack Overflow's new Documentation feature. My tutorial site is set up with similar ideas: a tutorial on a topic followed by a bunch of examples of that topic. It would be cool if I could kill two birds with one stone and upload my tutorials and examples to the Documentation site. If I choose a license that requires attribution, how does that work? Maybe this deserves its own question (maybe on meta?).

Right now I'm leaning towards either using Creative Commons Attribution 4.0 or the MIT license. I've also considered writing my own license, but I know that ends up being more trouble than it's worth.

So my question is: how do people usually handle the above concerns?

  • What exactly do you want to prevent? You list "scraping", "rehosting", "tiny footnote" -- would a not-tiny footnote do? Is scraping the problem, or do you also want to prevent someone downloading a few…many…all articles manually? Rehosting some…many…all of your articles is ok? – unor Aug 30 '16 at 16:12
  • @unor Thanks for the reply. I guess part of my confusion is that I'm not exactly sure what I want to prevent. What I'm thinking of are those shady websites that simply scrape other websites (Stack Overflow being a common target) and then rehost the stolen content, slathered in a bunch of ads. They usually have a link to the source buried in there somewhere, which is what I meant by my "tiny footnote" comment. But I don't know how to prevent that without also restricting the good guys who want to use content for stuff I want to allow (and even encourage). – Kevin Workman Aug 30 '16 at 16:26
4

Things like this happen all the time. Stack Overflow, Google Devs...

First off, we need to look at ways to license.

  • Stack Overflow works by licensing all content, text and code, under the Creative Commons Attribution Share Alike license.
  • Google Developers works by licensing all code under the Apache 2.0 license, and all other content under the Creative Commons Attribution license.

We kind of see two models here. Single licensing everything (the Stack Overflow model), and selectively licensing everything (the Google model).

Second, we need to figure out who the audience is.

Let's make a table:

People Type |      Code     |      Text     |
            | Read  | Copy  | Read  | Copy  |

Good Guys   |  Y    |   Y   |   Y   |       |

Bad Guys    |  Y    |   Y   |   Y   |   Y   |

Your good guys are the people looking to learn. They will read the text, but likely won't copy it. As for the code, they may look at it, copy it, or modify it. The code is the main interest to the good guys.

Your bad guys are copying everything for the sole purpose of making money. That's a given.

Third, we need to figure out what to restrict.

Right now, we want to stop the bad guys from doing the bad things they do. But we want to let the good guys pass freely.

You need to restrict any activity whose direct intention is to profit off of your work. This would include activities such as scraping, re-hosting... etc. Fun stuff. To restrict that, would mean violating the Open Source Definition, as well as hampering the good guys.

Using the information above,

Your best bet is to incorporate the Google model. This is what I recommend going forward:

  • License all code under the Apache 2.0 (or similar) license.
  • License all other content (e.g. text, images, media) under the CC BY-NC license.

Why Apache and CC BY-NC?

Only the bad guys copy non-code content. The CC license stops copying of that content, while letting good guys use everything freely.

The good guys will be able to copy code, and use it in any application. Since they don't use textual content, they don't violate any license. Note however, that use of textual content is still governed by various legal doctrines, such as Fair Use or Fair Dealing, permitting uses such as research, education, commenting, and private study.

The bad guys will be able to copy code, however, they can't copy any text for commercial purposes. It puts them in an infringing position.


Now for your considerations (and how they would work with my proposed model):

  • I'd like to allow other people to submit tutorials. I'd like to guarantee that I can use those tutorials without becoming a bad guy myself. For example, I could see maybe collecting the tutorials into an ebook or something.

    This would work, but there are some additional implications that you need to consider.

    First, you need users to license contributions to you. Not a big deal, can be solved with a ToS (Terms of Service) agreement.

    Second, is that you can't go after the bad guys. I'm shaky on this: I'm not familiar with legislation on these matters (most important would be the Digital Millennium Copyright Act). Here's the baseline though. To take action on any infringement, you must be the copyright owner, or an agent of the copyright owner. The problem with user contributions is that you are no longer the copyright owner. Assigning copyright is horrible - people will resist, and you require a physically signed paper. Therefore, you'd need to figure out a way to make yourself an "agent" (probably through the ToS). But I'm not completely sure how this works. It would be helpful to figure out how Stack Exchange deals with this.

  • There are multiple components to the site: the code (and its resources like image files), and the text (and screenshots of the running code), plus logos and whatnot. Maybe I should use a different license for different resources? That seems confusing though.

    I proposed this above! It's not as confusing as it looks :)

  • I'm using GitHub pages, which introduces its own copyright requirements.

    If the implications of GitHub pages only extend to what is included in this post, then you're fine.

  • It would be neat to make my site compatible with Stack Overflow's new Documentation feature. My tutorial site is set up with similar ideas: a tutorial on a topic followed by a bunch of examples of that topic. It would be cool if I could kill two birds with one stone and upload my tutorials and examples to the Documentation site. If I choose a license that requires attribution, how does that work? Maybe this deserves its own question (maybe on meta?).

    Stack Overflow contributions are licensed under the CC BY-SA license. That's cool, but it isn't cool if you put forward contributions made by other users (which, assuming the model above, would be licensed under CC BY-NC, an incompatible license). Of course, if the only things you send to Documentation are your own work, then you can do it. You can do whatever you would like with your own work.

    I'd note that even if you did send users contributions properly (i.e. user contributions were licensed with CC BY-SA), it would properly be unethical to do so, and you're somewhat becoming your own definition of a bad guy there.


The Your Post Is Tooo Long!!!! I didn't read...

  • License code under Apache 2.0, or another similar permissive license
  • License media under CC BY-NC or CC BY-SA, depending on your needs, and your way of dealing with infringers of content.
  • Umm... What? I'm proposing that all code is licensed under Apache 2.0, which allows anyone to use the code. Textual content isn't of primary interest to the "good guys." I'm stopping scrapers by licensing textual content under a more restrictive license, to empower the OP to tackle the "bad guys" easily, using mediums such as the DMCA. – Zizouz212 Aug 30 '16 at 19:52
  • But we're not talking about OpenBSD now, are we? We're talking about the OPs tutorial software. The bad guys are scrapers, of which their sole intention is to make money off of the tutorials. This licensing scheme stops that. – Zizouz212 Aug 30 '16 at 19:56
  • 1
    Thanks so much for the reply, this really helps me organize stuff in my brain. I think everything you said is correct, now I just have to decide if the added complications (which might scare off some good guys and make it harder for me to do possible cool stuff in the future) are worth thwarting any bad guys (which are admittedly very fictional at this point). Great answer. – Kevin Workman Aug 30 '16 at 20:34
  • @KevinWorkman Thanks! If you have any questions, feel free to ask - it's a lot to gulp down in one bite :) – Zizouz212 Aug 30 '16 at 20:54
  • Apache 2.0 is not a good idea for code in a tutorial in my opinion because it imposes lots of requirements to reuse. (Google just uses it because it is their license of choice for all their free software.) Instead I would advise CC-0 (no requirements) or MIT (if you care about attribution). – Zimm i48 Aug 31 '16 at 9:59

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.