|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||||
|
||||||
|
Re: Coding / Style Standards for sharing C code
Quote:
Now, this may not be a problem in FIRST, as I would assume that no one would ever pursue any type of copyright violations. However, if we are going to take the time to teach students about coding standards, we should spend a few extra minutes and talk about correct licensing. If you really want something with no license, you must explicitly grant it into the public domain. However, the person would have to agree to this when the code is entered into the repository, and a notice that this code is in the public domain would have to appear on the site. Of course, there are many other licenses that are open source, some would be good for this project, and others wouldn't. The BSD license (http://www.opensource.org/licenses/bsd-license.php) Allows any modification to the code to be used for any reason, as long as the license notice is retained. Thus, it is close to being public domain, but you guarantee that your name will stay with the code for posterity (as opposed to the public domain, where you could remove any notices from the code). Another problem depends on whether the code is distributed as a library, or a snippet of code (such as a function). If you paste a snippet of code into your file (including the license), you've then licensed the whole source file. So, you are restricted from choosing your own license for other parts of your code. If the code is distributed as a library, it is a little different. If the code licensed under the GPL (http://www.opensource.org/licenses/gpl-license.php), then anything that uses the code must also be GPL. However, if the library is licensed under the LGPL (http://www.opensource.org/licenses/lgpl-license.php), anything that uses it can have a different license. Even if someone licenses their library as GPL, for FIRST robots, it probably doesn't mean that you have to give other people your entire robot code, however. Under the GPL, you only have to distribute your source to the people who you distribute binaries (it doesn't need to be publicly accessible). Since it isn't likely that you will be giving someone your robot's HEX file, you really don't need to distribute the source. This last issue makes this not as big of an issue, but it should be addressed in some way.would have to appear on the site. Of course, there are many other licenses that are open source, some would be good for this project, and others wouldn't. The BSD license (http://www.opensource.org/licenses/bsd-license.php) Allows any modification to the code to be used for any reason, as long as the license notice is retained. Thus, it is close to being public domain, but you guarantee that your name will stay with the code for posterity (as opposed to the public domain, where you could remove any notices from the code). Another problem depends on whether the code is distributed as a library, or a snippet of code (such as a function). If you paste a snippet of code into your file (including the license), you've then licensed the whole source file. So, you are restricted from chosing your own license for other parts of your code. If the code is distributed as a library, it is a little different. If the code licensend under the GPL (http://www.opensource.org/licenses/gpl-license.php), then anything that uses the code must also be GPL. However, if the library is licensed under the LGPL (http://www.opensource.org/licenses/lgpl-license.php), anything that uses it can have a different license. Even if someone licenses their library as GPL, for FIRST robots, it probably doesn't mean that you have to give other people your entire robot code, however. Under the GPL, you only have to distribute your source to the people who you distribute binaries (it doesn't need to be publicly accessible). Since it isn't likely that you will be giving someone your robot's HEX file, you really don't need to distribute the source. This last issue makes this not as big of an issue, but it should be addressed in some way. |
|
#2
|
||||
|
||||
|
Re: Coding / Style Standards for sharing C code
Make it public domain and I like the idea of a library for distribution.
Building a Black-box. The code is locked from tickering hands, and a document containing 1. function prototype 2. Description of the function 3. Original Author Can be made up fairly easily. Versioning of the library would simplify things too. my 2 cents.. Phil |
|
#3
|
||||
|
||||
|
Re: Coding / Style Standards for sharing C code
Quote:
I also have to add that I like the way you copied yourself there... ![]() P.S. I don't like the default code style much. Last edited by Ryan M. : 30-04-2004 at 15:09. |
|
#4
|
|||||
|
|||||
|
Re: Coding / Style Standards for sharing C code
I say that uniformity. And the basic layout (header comments and such) is pretty good. I usually don't keep the bottom bit, though.
Sorta like MPLAB! |
|
#5
|
||||||
|
||||||
|
Re: Coding / Style Standards for sharing C code
Well, Dr. Joe just said I volunteered for the licensing portion of the committee. I'd be willing to accept with the disclaimer that IANAL* although I've been told I should be one at various points. My other disclaimer is that I need someone to check to see that I don't make any more copy and paste errors
![]() *IANAL - I Am Not A Lawyer |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |
| Inserting Naviagation code into Default code? | actorindp | Programming | 3 | 28-01-2004 18:12 |
| Help On Coding 2K1 Controller | GregTheGreat | Programming | 9 | 05-12-2003 18:35 |
| style | srawls | Programming | 19 | 23-05-2002 17:02 |