7

I read this Gawker article about how a writer reused some of his older material for new assignments for different magazines.

Is there any similar ethical (societal?) dilemma when doing the same thing in the realm of Programming? Does reusing a shared library you've accumulated over the years amount to self-plagarizm?

What I'm getting at is that it seems that the creative world of software development isn't as stringent regarding self-plagarism as say journalism or blogging. In fact on one of my interviews at GS I was asked what kind of libraries I've developed over the years, implying that me getting the job would entail co-licensing helpful portions of code to that company.

Are there any cases where although it's legal to self-plagarize, it would be frowned upon in the software world?

8
  • 2
    Even in other fields self-plagiarizing is not so bed. Some very good books were grown from series of articles or conference papers of the author that have already been published. Commented Jun 19, 2012 at 22:03
  • 2
    Battle-scarred and debugged code represents quite a bit of value. Why not reuse?
    – user1249
    Commented Jun 19, 2012 at 22:14
  • 1
    It really depends on who owns the copyright on the duplicated material. If you were employed to write the code by a company, they may well own the copyright and you should not be copying it to another company.
    – Jaydee
    Commented Jun 20, 2012 at 14:32
  • 1
    Have you ever heard of DRY? Commented Jun 20, 2012 at 15:13
  • 1
    I'm voting to close this question as off-topic because it is about a legal question that can only be properly answered by a lawyer.
    – user40980
    Commented Jul 2, 2015 at 1:11

4 Answers 4

15

I've never heard of it being called "self-plagiarizing" in the software world. It's called "reusable libraries". In journalism, there may be an expectation that a writer will submit and publish new articles, as that is what they are paid to do. A software developer may be expected to help produce new software but if they use pre-existing libraries that they wrote before, that's not so bad. It helps move the project faster, and it prevents you from having to re-invent the wheel.

At the same time, if I had a truly awesome library of reusable components I'd built up over the years, I'm not sure I'd ever give them to an employer to use in their project if the licensing might mean I'd never be able to use them again for any other projects in the future.

As an employer, would I trust some new developer who has a great big library of awesome stuff if I can't get full access and control of the source code? I might be willing to buy pre-built libraries from vendors with support contracts.

And to be honest, I don't even think the comparison to journalists and writers is appropriate. It just doesn't make sense. One of only things these two activities have in common is the verb "writing".

5
  • 1
    Maybe a better analogy would be an architect recycling architectural plans for different houses. The cases where it is unacceptable are similar (e.g., it often is not OK to re-use graphics, even if you have permission).
    – Brian
    Commented Jun 19, 2012 at 21:59
  • 2
    @Brian: I am not an expert but I have heard this is actually quite common. I had a friend whose parents had a "custom" built home which was really looking over plans the architect had done before until they found one they were mostly happy with and then having the architect tweaking it until it was "just right". Commented Jun 19, 2012 at 22:01
  • Yes, I had that knowledge in mind when I made the comparison.
    – Brian
    Commented Jun 19, 2012 at 22:02
  • @FrustratedWithFormsDesigner What you describe is cheaper then having the architect start from scratch. If you are expecting and paying for 100% custom, and you get a design from a library you would be very upset. Commented Jun 19, 2012 at 22:04
  • @mhoran_psprep: I suppose. I've never worked with an architect but I imagine that even if I paid and expected 100% custom work, there would still be some common components and designs, probably for infrastructure issues such as plumbing, electrical wiring, ventilation , etc... And that would be OK by me because I don't expect the architect to design new types of air ducts for a custom home, just because I said I want "custom". I guess if we really wanted we could argue whether those "came from a library" or maybe the analogy isn't a perfect fit... Commented Jun 20, 2012 at 14:21
4

The issue isn't who wrote the code, but who owns the code. If you were paid to write some code for one employer and then re-used that same code (without permission) on a job for someone else, that's a problem unless you somehow retained the rights to the code. In the US, at least, that's not how it usually works -- the guy who paid you to write the code owns it.

The main difference I see between writers and programmers in this regard is that if an author writes new material that expresses essentially the same ideas, the right thing to do is to at least credit the first version with a line like: As I wrote previously in The Popperville Gazette.... It'd be unusual to do that in code, though... as long as the previous work isn't patented (as opposed to copyrighted), you should be able to re-implement the idea in new code without necessarily needing to credit the first work.

2
  • Right - the question is who holds the copyright. For journalists, that often means the newspaper or magazine that published the piece. For programmers, that often means your employer (see the "work for hire" clause in your employment agreement) or the client (ibid.) unless your contract makes it clear that you own it. Whomever owns the copyright has the right to use it. If you don't, then you don't. Legally or ethically. If you do, then you do. Commented Jun 20, 2012 at 23:39
  • plagiarism has nothing to do with ownership, plagiarism is about the readers of your code.
    – paul23
    Commented Jan 31, 2014 at 14:33
2

If you have the right to reuse code, or use a library, I can't see how that would be frowned upon. Unless they wanted you to develop the code from scratch.

Why would they want that?

  • to take advantage of updated technology.
  • to have a library of code with hooks in place for expansion.
  • to have the source code.

If they were paying you the hours to rewrite the code, but you use the same libraries, they will feel that they over paid.

1

Self-plagiarizing (by Joshua Bloch) below code has been officially considered copyright violation:

private static void rangeCheck(int arrayLen, int fromIndex, int toIndex) {
    if (fromIndex > toIndex)
        throw new IllegalArgumentException("fromIndex(" + fromIndex +
                   ") > toIndex(" + toIndex+")");
    if (fromIndex < 0)
        throw new ArrayIndexOutOfBoundsException(fromIndex);
    if (toIndex > arrayLen)
        throw new ArrayIndexOutOfBoundsException(toIndex);
}

But as long as one self-plagiarizes within the same company, it's likely legally OK.

Self-plagiarizing is also OK ethically, as long as it does not fall into violation of DRY.

5
  • While I don't have it at the tip of my fingers, there was an instance of a photographer violating copyright (work for hire) because he took a similar photograph to one he had taken before (same model though years later, same pose, same location).
    – user40980
    Commented Jun 19, 2012 at 22:30
  • 2
    Terrible example. Yes, a jury reached a partial verdict that Google infringed, but the judge later ruled in Google's favor, stating, "the particular elements replicated by Google were free for all to use under the Copyright Act."
    – Sean
    Commented Jun 20, 2012 at 3:02
  • I wouldn't say DRY has anything to with ethics. Lack of competence, skill, and knowledge to grossly violate it...yes. Nothing unethical about it unless you do it on purpose hoping it will cause hell for future maintainers.
    – rlperez
    Commented Jun 20, 2012 at 14:27
  • @Sean whatever the ruling is today, or will be tomorrow or ten years after, I would think twice before concsiously copying code I wrote for another company (and to avoid misunderstanding - no, this is not about rangeCheck, I don't think Bloch copied it from jdk/src)
    – gnat
    Commented Jun 20, 2012 at 14:28
  • 1
    +1 the example is irrelevant; the point on how the author may not be the copyright owner is very relevant. Commented Jun 20, 2012 at 15:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.