Licensing is a buncha hooey.

There, now that I've got some of the crypto-anarcho-communist bile out, let's talk about licensing my site. I know full well that no one's going to want to pay for my little tutorials and diatribes; nor should you. JavaScript Kids doesn't cost me hardly anything to run, and all the content is written in my spare time, fueled only by passion for coding and web design and the desire to pass on what I learn in professional and academic contexts. Since the site content is educational in nature and not enterprise-quality code, I lose nothing by giving it to you.

That being said, I ask a couple things of you if you're going to modify, redistribute, or use my stuff on your own website. First, credit me. Attribution, even when it's just a comment in the source code, is an author's first right and protection against exploitation. I insist on this.

Second, if you're thinking of using my stuff in a commercial application, I suggest you contact me at daniel dot j dot gallagher at gmail dot com. This is entirely optional, and I won't pry too much; mostly I'm just curious what people find useful. You can also do this in order to request different or more specific licensing terms, should you need them.

I like to think this goes without saying, but there's no warranty on the code—it's provided "as-is." Moreover, I can't restate enough that it is not intended to be used unmodified in an enterprise setting. The security infrastructure is incomplete and likely to be buggy, and the code was written with small, low-traffic websites in mind. Do not come crying or lawyering to me if your MySQL database melts down because of bugs in the code that you copied, verbatim, without having an engineer proofread it.

With regards to sub-licensing, I'm flexible. I favor BSD and MIT-style "permissive" open source licenses for code, and CC Attribution-ShareAlike (BY-NC-SA, BY-SA) licenses for content. But I'm also very supportive of creating GPL/LGPL/GFDL software. If you're operating under any of the above, you can copy-paste with impunity. Otherwise, you should ask.

Finally, if you find this site useful, I'd appreciate it if you'd spread the word a little—blog about it, tell a friend, etc. Also, please send feedback to daniel dot j dot gallagher at gmail dot com.