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? |
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. |
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. |
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.
|
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. |
Slightly off-topic, but my 2 cents:
Quote:
|
Quote:
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. |
I'm not sure of what you're talking about and what it has to do with what Iyanga said.
|
Quote:
Was I really unclear? Quote:
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. |
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. |
Quote:
I read this: Quote:
|
Perhaps I was ambiguous. 5 tools for 5 jobs instead of 1 tool for 5 jobs.
|
Quote:
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. |
Quote:
|
ARR == All Rights Reserved
Just an abbreviation. :) |
Quote:
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.... :-) |
Quote:
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. |
Quote:
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. |
Quote:
|
Quote:
Quote:
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. |
All times are GMT -6. The time now is 11:34 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI