2

I have written detailed, low-level pseudocode for a new algorithm and would like to implement it in C++ instead of Python or R. However, I don't know how to program in C++. Therefore, I want to ask my friend who is a C++ programmer to help me with implementing the algorithm in C++ and offer coauthorship for the resulting paper and package. I will do other parts in the paper such as writing literature review and conducting a simulation study.

Should I give them the first authorship or second authorship for the resulting paper?

4
  • 1
    It's really better if all the authors are involved in the writing of the paper. Commented Oct 2, 2023 at 2:41
  • 4
    This probably entirely depends on how much work goes into going from "pseudocode" to "implemented". The word "algorithm" is rather vague, and it's very possible that most of the work will be in the actual implementation. Not to mention, once you have implemented the algorithm you'll need to test it, and choosing what data to test it on is probably important work, too.
    – Stef
    Commented Oct 2, 2023 at 7:57
  • 2
    @Stef's comment should be expended into an answer, and then it's the correct one. Commented Oct 2, 2023 at 9:38
  • What about writing the paper? I can imagine that if you have the idea (and your pseudocode is indeed working) and you also write the paper, then you both should be co-first authors.
    – aqua
    Commented Oct 2, 2023 at 11:09

3 Answers 3

1

If it is necessary to make such a distinction then you are first author since the algorithm (assuming it is correct) is yours. Only a specific implementation is theirs. The intellectual content came from you.

However, an alternative, that would be common in (pure) math and (to a large extent) in CS, would be to treat the project as collaborative with author order unstated and listed as alphabetical. The paper could contain a paragraph specifying the contributions of each.

If one programs at the direction of another, while skill is needed, the result is the intellectual property of the one who conceived the solution and, in your case, likely the problem itself.

Note also, that a translation from, say, Python to C++ could be done mechanically by a cross-compiler. Depending on the specificity of pseudo-code it might even be possible to do mechanical translations to actual programming languages.

2

In my field, the first author is the one who "owns" the project and usually does the most work on all aspects of the manuscript. Middle authors have varying levels of contribution - though everyone must meet the minimum requirements for authorship. Last author is usually the senior author.

Who goes where depends on many factors. It is not as simple as "giving" a particular position (assuming you are trying to act ethically). Who came up with the idea vs who implemented it is only one aspect. And there is obviously much more that goes into writing a manuscript than a bit of coding. As long as you both meet the criteria for authorship, it's up to you and your co-author to decide.

What this all means for you is that you should have an early discussion about the order. I think it's reasonable to say you want to go first - it is your project after all - but it should be a mutual decision. There is no right or wrong option, it just depends on who does what for the project.

1
  • 2
    Unfortunately, it's quite likely that the questioner's field in fact has a specific convention for this particular question and an answer from outside that field will be useless. Commented Oct 2, 2023 at 6:34
-3

This question is a tough one. As an analogy, many people uses the common spreadsheet program Excel, as well as Python to produce the content of their papers. They ask for help not to friends but to random strangers on the internet (for example on Stack Overflow (SO) ).

However, Doug klunder the original creator of the "pre-"Excel Doug Klunder nor the latest implementer of Excel Charles Simonyi are co-author of papers. And also the many contributors from SO and similar sites are not co-authors of the paper. Guido Van Rossum of Python fame may be cited every now and then, but he is not co-author of the python based papers, not even if he contributed to them (answering FAQ, answering to blog posts, fixing bugs, etcetc.)

In short and in general: if your friend is just building the code for you, in my view he deserves a lot of gratitude, but not the co-autorship. However, YMMV depending on your field.

Even more general: your friend is doing his job (programming) for free for you. If they want something in exchange, they are practically lending you some money (in form of their work). If, on the other hand, you give them first authorship and later realize it is too much, you will always have the feeling of having given (lend) him too much, so you will expect a subsatntial pay back.

Do you know the saying

If You Want to Lose a Friend, Loan Them Money

? you are walking that thin line ... either you give up on asking your friend for so much help, or he accept doing that as a pro-bono help to you, without messing up with "sizing" the right reward.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .