Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I ported a library to Java, but am wondering what to do with the JavaDoc comments. The original library used javadoc comments too, so do I leave the @author tags from the original code? And how do I give myself credit as the person who ported it over?

share|improve this question
1  
How are you porting a library to Java, if the original lib contained JavaDoc comments? Ultimately, though, what you must leave in is determined by the license, which you have not mentioned. –  Jason Lewis Jan 14 '12 at 2:45
    
Other languages use JavaDocs too btw. ActionScript for example. I think you can assume I have checked that I have permission to port the library. I am really looking for best-practice. –  Adam Harte Jan 14 '12 at 3:54
add comment

3 Answers

The license that governs the original code will likely define what is required - many licenses require you to explicitly give credit if you create a derived work.

In terms of what is appropriate, I'd suggest that it's always appropriate to give credit to your sources, for example:

@author Java port by Adam Harte, based on ActionScript original by Bill Gates

(And yes, I know this isn't accurate, as the OP didn't tell us the original language or author, it's just an example.)

share|improve this answer
add comment

Legally, in most places where software is written (including NZ), your port is a copyrightable derivative work (through either translation or adaptation, it's not obvious which) based on another copyrighted work. Assuming the license on the original work allows you to do the port at all, you must respect the rights of the original authors, including attributing their work to them.

Ethically, unless your port involves significant creative effort, it isn't even clear that you deserve any credit at all. Many is the time I have "transliterated" an algorithm from one programming language to another, where my effort consisted merely of mapping one set of keywords and special symbols to another. Java and C#, for example, are so closely related that I'd have a hard time claiming a copyright in any code I moved from one to the other.

share|improve this answer
add comment

I'm no expert, but basically I believe you are the author of the code you have written, as long as it's not a copy, and you were allowed to look at the code in the first place. The original code is just your inspiration. Best practice is to clearly mention who wrote the original code though.

To elaborate I believe copyright does not protect code if it is re-written in a different language, even if it is pretty close to the original. If the solution represented by the software is patented however you can't reproduce it in any language.

The only question as far as I can see is if a port is to be considered derived work, and if the particular licence protects this.

Edit:

It seems like most people disagree with me, and consider re-writes in a different language to be derived work: http://stackoverflow.com/questions/1919010/does-porting-count-as-derivative-work

The accepted answer here however says otherwise - that only the actual lines of code in the original software are protected: http://stackoverflow.com/questions/77044/licensing-a-rewrite-from-gpl-to-mit

share|improve this answer
2  
Boo! This kind of playing fast and loose attitude with IP that gives software coders a bad name. It is definitely not "just your inspiration" if you look at the code and reproduce the same interface and functionality in a different language. –  ThePopMachine Jan 14 '12 at 6:58
    
I would be very interested in hearing your answer on this topic @ThePopMachine –  Adam Harte Jan 14 '12 at 7:01
    
@ThePopMachine, if you believe this isn't the legally correct answer, please vote me down. I'll try to find a credible source for my view. Basically this is what I believe to be true. Take the various XUnit frameworks for examples. Who are the authors? They are basically just ports of eachother.. –  Torbjørn Jan 14 '12 at 7:16
    
@Torbjørn Without this being a comment in your answer (I don't have an opinion on the matter), please refrain from answering questions if you have to try to find a credible source for my view. This is not the best place to share your opinions, unless of course you can back them up by facts & references. –  Yannis Rizos Jan 14 '12 at 16:42
    
@Torbjørn: My problem is with the attitude in the first two sentences. You seem to think it's okay to look at the code, and as long as you type it in in a new language, the original is "just inspiration". Where are you drawing the line? What if I translate from Python to Ruby line by line? What if you use machine translation? What if it's from ANSI C to C99 ? Copyright protects the way things are expressed, but this isn't limited to just the exact sequence of characters (which is changed by porting from one language to another). –  ThePopMachine Jan 14 '12 at 20:51
show 6 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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