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, 12:23 PM   #7
Joviex
 
Joviex's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 42
Originally Posted by Iyanga View Post
Slightly off-topic, but my 2 cents:

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.


I absolutely agree in principle: Modularity is the best approach; however, since we are not all hands-on in the same repo, with the ability to pull from each line/component being made, it becomes difficult, over time, to maintain a link to "shared" updates.


Perfect example. I have seen a few "horse feed timers". Do they all use the same logic? of course. But the level of integration is different.


Had there just been a "horse timer" function? Maybe, but that requires a serious investment on the part of people to maintain vigilance to changes and adapt/update their code base(s) accordingly.


I feel it is just too much to ask casual, and even non-casuals, in a loosely shared environment, do adhere to a standard like that.
  Reply With Quote
04/23/14, 12:58 PM   #8
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
I'm not sure of what you're talking about and what it has to do with what Iyanga said.
  Reply With Quote
04/23/14, 01:16 PM   #9
Joviex
 
Joviex's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 42
Originally Posted by Seerah View Post
I'm not sure of what you're talking about and what it has to do with what Iyanga said.


Was I really unclear?

Originally Posted by Iyanga
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.


Which I agreed, that modular approaches to coding is the better approach rather than a single top-down, old school, stick in everything and the kitchen sink approach.

My advocacy is for modular units.

I then said in this environment of hobbyists and non-hobbyists it would be a stress point to have everyone work like a typical development environment where people pull parts of code from branches (modules) being updated, so they could update said "code"/"modular pieces" in their code.

The short solution to that is to simply start making libraries since we dont all work in the same shared repository space.

The long term problem with that, who decides when a library is chock full of stuff that is overbearing?

I need a horse timer, but the library for horse stuff has 80+ other functions I wont/dont use.

  Reply With Quote
04/23/14, 01:30 PM   #10
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
All Iyanga was saying was that having 5 addons that all focus on one thing and do it well is better than having one large addon that does those 5 things. Nothing about how there should only be one addon for a feature or one way to do that feature.

This was in response to the OP wanting to combine several small, focused addons into one larger addon.
  Reply With Quote
04/23/14, 01:46 PM   #11
Joviex
 
Joviex's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 42
Originally Posted by Seerah View Post
All Iyanga was saying was that having 5 addons that all focus on one thing and do it well is better than having one large addon that does those 5 things.
I did not read it that way. It is ambiguous at best.

I read this:

Originally Posted by Iyanga
I prefer the Linux approach - one tool for one purpose
And took it to mean exactly the linux approach. One tool for one job. Not 5 cool tools for one job, no matter how focused they are, there are still 5 flavors.
  Reply With Quote
04/23/14, 03:44 PM   #12
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
Perhaps I was ambiguous. 5 tools for 5 jobs instead of 1 tool for 5 jobs.
  Reply With Quote
04/23/14, 05:50 PM   #13
Joviex
 
Joviex's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 42
Originally Posted by Seerah View Post
Perhaps I was ambiguous. 5 tools for 5 jobs instead of 1 tool for 5 jobs.
Nope =) I think we are both on the same page.


Everything in an all-in-one == bad
Focus on making a tool perform a specific goal. 1 to 1.


My over-reaching is about making that 1 to 1 tool more "open" so it is highly pluggable into other areas for reuse.
  Reply With Quote
04/23/14, 07:31 PM   #14
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   #15
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, 07:53 PM   #16
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, 08:04 PM   #17
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
04/24/14, 11:36 AM   #18
Saucy
 
Saucy's Avatar
Join Date: Apr 2014
Posts: 20
Originally Posted by Joviex View Post
Nope =) I think we are both on the same page.


Everything in an all-in-one == bad
Focus on making a tool perform a specific goal. 1 to 1.


My over-reaching is about making that 1 to 1 tool more "open" so it is highly pluggable into other areas for reuse.
When it came to addons in WoW, All-In-One addons was the one thing I couldn't stand. Modularity is king.

I often download people's addons; not so I would copy their code, but look at how they have structured the code. Tips on how the Lua syntax works and how they often solve "simple" problems (simple as toggle settings in SavedVariables file).
It's rather silly I know, but I look at how people indent (if they use space or tabs), use semicolons at the end. I look if they have any documentation in their code (big shoutout to alfpogs for SimpleClock, awesome documentation!).

I'm currently building a "core" that will handle the modules I create (which each will have it's own localization, slash commands, keybindings, etc). I am by no means a super-programmer, I mostly only code for fun in the hopes of learning more as I go.

As a person, I might be rather silly. But when it comes to learning more about programming I am very serious.

Sorry if I derailed the topic a bit.
  Reply With Quote
04/24/14, 12:07 PM   #19
ins
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 76
Originally Posted by Seerah View Post
Perhaps I was ambiguous. 5 tools for 5 jobs instead of 1 tool for 5 jobs.
In some areas we have 7 tool for 1 job now
  Reply With Quote
04/24/14, 12:39 PM   #20
Joviex
 
Joviex's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 42
Originally Posted by Saucy View Post
I'm currently building a "core" that will handle the modules I create (which each will have it's own localization, slash commands, keybindings, etc).
Doing exactly the same. I am hopefully building the libraries as modular, or close enough to it, to be standalone use to someone else. IN the very least, someone can reach into one, grab some functions, export them for use elsewhere.

Originally Posted by ins View Post
In some areas we have 7 tool for 1 job now

Fo shizzle. But I dont think you have much control over this, especially this early in the game. I do see some point, if a good nucleus can agree, having a central core set of libraries that perform all these same functions, such that, even if there are 5 flavors of vanilla, everyone is at least using the same vanilla beans.
  Reply With Quote

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

Thread Tools
Display Modes

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