Thread Tools Display Modes
04/22/14, 06:25 PM   #1
JTFinnegan
Join Date: Apr 2014
Posts: 1
Question about code borrowing.

I want to get back into coding, I used to do it as a hobby, but its been a while. I also have never coded for others, its was always for myself. So I find a have a few questions about the ethics of coding in an open environment like this.

To make it a more concrete, I am thinking of making a addon that will start off similar to Piggybank but with more control of how the money goes in and out. After I get that part working, I plan to add features similar to Mules Managment and Bank Stuffer. I have used 2 of the 3, and they work pretty well, but I feel that since they all work with the bank, they should all be in one addon. Also it lets me get some coding practice in.

Now I could just grab a copy of Piggybank, and change some of the code in it, but I'm sure that would be considered wrong. So I'll be writing the central code for it myself. But for example, in Piggybank, there is a section of code for setting up the setting menu. Is it considered bad form to borrow that code, and the expected thing is to start from the base code library and figure out everything oneself.

What is the consensus on this? Any legal or ethical considerations that await to trip up a newbie?
  Reply With Quote
04/22/14, 06:42 PM   #2
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 437
THANK YOU! Someone who actually asks!

Legally, copyright applies to addons the same as it does to any other intellectual or artistic work. Unless explicitly specified otherwise, addons are ARR.

Speaking realistically, if you take 1 line of code out of 500, chances are no one is going to come after you about it (but not impossible!). And some things are going to be extremely similar no matter what you do, since everyone is working from the same API.

Ethically speaking, talk to the authors in question. Most authors don't object to you using parts of their code if you just have the common decency to ask first, and if you give credit where credit is due.

All of that said, I am NOT a lawyer. I am speaking purely from my 12 years of experience dealing with this sort of thing as a non-lawyer but someone who cares about protecting authors and their copyright, but do NOT take anything I've said as actual legal advice.
__________________
Co-Founder & Admin: MMOUI
Avatar Image by RaffaeleMarinetti
  Reply With Quote
04/22/14, 06:50 PM   #3
Stormknight
 
Stormknight's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 128
Go talk to the authors.

Most times I have ever approached an author to say I'd like to borrow inspiration from their code, they're good with it and will often offer additional help and advice on top.

The flip side is, if you approach an author and say, "Hi, I plan to write an addon that does everything yours does, but better/more" then they may be less helpful.

You don't know until you ask though! Someone asked me that very question about a WoW Addon I had written and I had stopped playing, so was happy to just handover to them as that way it would at least get maintained.
  Reply With Quote
04/23/14, 06:17 AM   #4
skyraker
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 154
I typically try, if I borrow a snippet of code that helps me out, to at least thank the author of that addon in mine (I've gotten a little behind but still). As Cairenn said, you are bound to have something look similar to something in another addon simply because it is the only way to do it. But, to me, if I found a simpler way to do something in another addon, I at least want to give them some credit.
  Reply With Quote
04/23/14, 07:25 AM   #5
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
If not specified, yeah, assume it's full copyright. I have seen a couple explicitly list an open source license, in which case you can look up exactly what you're allowed to do with the code. Many open source licenses do allow for all the way up to copying the code to make your own tweaks and re-releasing it.

On the flip side, if the authors do let you use their code (in whole or part), consider also giving your changes back. Perhaps that exact feature is on the author's backlog and they just haven't had time to implement it yet.
  Reply With Quote
04/23/14, 11:29 AM   #6
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
Slightly off-topic, but my 2 cents:

I have used 2 of the 3, and they work pretty well, but I feel that since they all work with the bank, they should all be in one addon.
I prefer the Linux approach - one tool for one purpose. I hate addons that try to achieve everything, because I can't easily replace the part I hate with a different addon.
  Reply With Quote
04/23/14, 07:53 PM   #7
Vuelhering
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 169
Originally Posted by skyraker View Post
As Cairenn said, you are bound to have something look similar to something in another addon simply because it is the only way to do it. But, to me, if I found a simpler way to do something in another addon, I at least want to give them some credit.
True, and "means of access" are not copyrightable. If there's a provided method to access a function, that's the way it's done and thus, no creativity is involved in doing it. Not creative => not copyrightable. Now, if someone figures out a really clever non-standard access method, it's probably still copyrightable.

Similarity is one reason I very rarely look at anyone else's code. Part of the entertainment for me is coding, not copying. If I do run into a roadblock and see someone else has solved the issue, I might ask how and failing to figure it out, I might look. And the first thing I'll look at is the usage rights... if someone demands a big splash screen with their name on your program, or basically says not to copy or distribute it, I'll look elsewhere.

I support and will abide by the GPL and include things like "marked portions of this code are copyright by so-and-so". If it was placed in the public domain, I rarely list credit by name, but will list where it was found. PD work (that was legitimately put in the public domain -- not stolen code and falsely placed in PD) is freely usable with no encumbrances whatsoever, including any requirement to list author. (The only limit to PD work might be sending "munitions" to unfriendly countries.... :-)
  Reply With Quote
04/23/14, 07:31 PM   #8
Vuelhering
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 169
Originally Posted by Cairenn View Post
Legally, copyright applies to addons the same as it does to any other intellectual or artistic work. Unless explicitly specified otherwise, addons are ARR.
Cairenn, you've used that term "ARR" more than once, and I've never once heard it in any legal context regarding copyright before. What's it mean?
  Reply With Quote
04/23/14, 07:34 PM   #9
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 437
ARR == All Rights Reserved

Just an abbreviation.
  Reply With Quote
04/23/14, 08:04 PM   #10
Vuelhering
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 169
Originally Posted by Cairenn View Post
ARR == All Rights Reserved
Just an abbreviation.
Ah. I don't think that's used anymore (in a legal context) except on pre-Berne stuff. I still see it on recent works, but I don't believe it's necessary anymore. It's a throwback to the old copyright stuff in countries that tried to limit some rights of copy protection if you didn't "reserve all your rights".

There are some potentially interesting ways it'd be possible to prevent code from being stolen, although the best way is to simply not release it.

Barring that, I suppose you could obfuscate it, or at least strip out all the comments and white space (which actually serves a purpose of making it smaller). You could even encrypt parts, and protect it with the DMCA if it's decrypted and distributed. But all these methods are tried and ... failed. If someone wants to steal it, they can find a way. Usually, it's easy. Sometimes it's tougher, but it can almost always be done. Certainly in this context, it's pretty easy.

But, to the OP: if you want to borrow code, simply contact the authors. Most of them will say "Sure! Just add my name in the header and documentation" or something similar. Many others will tell you to knock yourself out. The only people that will really care are those who did large packages which takes a lot of time to do, who actually might make some money from it.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Question about code borrowing.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off