So you just finished working on an amazing Instructable, involving Arduino, a Raspberry Pi, or another project with Code, and you want to post it on Instructables. You are about to post it, when you think to yourself, "Wait, what if someone steals my code and says it's their own, and I get forgotten about?". If this is the case for you, then you need to Copyright your code.
This Instructable will give a run down on what the GNU GPL is, along with its benefits, and how to implement it into your projects.
Step 1: What Is the GNU GPL?
The GNU GPL, or GNU General Public License, is a License you can put on works like code, and basically says that people can redistribute the work/modify the work, with the same exact licensing applied to it. If someone redistributes the compiled work (however it may be compiled) it has to have the accompanying source code available as well. If you have the work you created is free, other people can not take it with the same copyright (or without) and sell it for any amount of money.
Step 2: Why Use the GNU GPL?
The GNU GPL has several benefits to just putting your project with it's source out on the web for the whole world to steal.
People know the work is yours
When someone comes along and finds your project and code and modifies/redistributes it without proper licensing, people don't know it's yours, and you originally made it. Kind of like a never ending ticket for bragging rights on your work, no matter what happens to it.
It's very well known
According to oss-watch.ac.uk, 70% of all of the projects in Sourceforge use the GNU GPL v2. Also, the Top 20 Open Source Licenses at www.blackducksoftware.com shows that the GNU GPL v2.0 is at the second place, and with the GNU GPL v3.0 at #4. This means that people who are most likely to download your project with it's source, and modify it, already know what to do, and not to do.
It's easy to use and understand
The GNU GPL is extremely easy to understand, and apply to your works. In just a few steps, you can get your application to be copyrighted and safe from people who just want to steal your stuff!
Step 3: How to Apply: Part 1
So you decided to use the GNU GPL v3! Well, now what? Well it's time to apply it to your code.
Note: This instructable is on only the GNU GPL v3, not v2/v1, they are different, as the GPL v3 fixes some things such as loopholes and other important things. To see the differences between the version 2 and 3, check out this website: http://www.differencebetween.net/technology/softwa...
The first thing you will want to do if you haven't already, is read the Preamble at least of the GNU GPL. This isn't mandatory at all legally, but it usually is best to know what kind of license you are putting on your code.
The next thing, after you have optionally done that, is hop into the directory of your source code. You will need to put in a file called COPYING.TXT (File also attached) somewhere in your source code, easily accessible, so usually in your src folder if you have one. Do NOT modify this file at all, and make sure you copy the ENTIRE file from the website source or the attached file on this step page.
Step 4: How to Apply: Part 2
Now it is time to go to your source file(s) of your project.
If your project is only one file big, you will want to add this to the very top of your source file (Commented out):
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses>.
The <year>, <author> and <one line to give the program's name...> do not need to be in <> signs, they just symbolize that you put something in it's place.
The first line <one line to give the program's name and a brief idea of what it does.> is basically what it says. You put the program's full name, and a very brief description of what it does. An example of this is:
Carl's Burgers, help Carl and his friends make the worst burgers around town!
The year is the year(s) the copyright has started to the current year (if the copyright is still currently active). the year may be a range, ex: 2013-2016 instead of: 2013, 2014, 2015, 2016.
The name of author, is the full name of the Author of the code.
An example of the Year/Name line is:
Copyright (C) 2014-2016 Harry Potter
Step 5: How to Apply: Part 3
Adding the license is almost done, now time for some extra things that should be done.
If your application has user input/output like a terminal, it is best to show something like this when it starts up for the user to see:<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The <program>, <year>, and <name of author> are simply the name of the program, the same year(s) put for the header of the files in the previous step, and the author's full name.
commands 'show w' and 'show c' are just hypothetical, they can be whatever you want. The same information can be shared in something like an 'about box' in a GUI application, instead of commands.
Another thing that is needed is a README file, usually in the same directory as the COPYING.TXT file, that contains information on how to contact the author through electronic and paper mail.
Step 6: Conclusion
So, if you have followed all of the steps correctly, your work should be copyrighted! Now nobody can steal it and claim it's theirs, and you have eternal bragging rights to what you make.
One last thing, If you see a violation of the GNU GPL check out this page: http://www.gnu.org/licenses/gpl-violation.html
Step 7: Bibliography
This step is just a list of links I used in the making of this project, and I highly suggest you skim over them, as well.