55

I am doing my thesis-based master’s in computer engineering and am required to program a tool in C++ as a part of my research. I am quite impressed by the help offered on the Code Review website and am considering posting a big chunk of my code for suggestions and improvement. However, I am also worried that someone may plagiarize the idea contained in my posted code. This, in turn, might affect the credibility of my work.

I believe one solution is to post a minimal, verifiable and complete example for the code I want suggestions for. However, I am interested in knowing if it is possible to post my code as is and not be worried about it getting copied.

16
  • 13
    What exactly are you concerned about - what do you think will happen, and how do you think you will be affected, if someone copies your code chunk without attribution (and does what with it?)?
    – ff524
    Commented Nov 1, 2017 at 4:55
  • 13
    Code Review is the place to go if you're willing to submit a specific piece of code you're worried about. An MCVE defeats the purpose of a Code Review as in Code Review defines such. Have you taken a look at their help center? Examplified code is explicitly off-topic for that site.
    – Mast
    Commented Nov 1, 2017 at 7:59
  • 12
    In principle, getting help from the online community is no different than getting help in any other way while working on a master thesis or any other assignment, which is supposed to be solely your work. So, I'd also refer you to useful answers to a similar question (although you are concerned with a different aspect of the problem): academia.stackexchange.com/questions/84299/…
    – greenb
    Commented Nov 1, 2017 at 8:42
  • 72
    Can we assume you know that user contributions licensed under cc by-sa 3.0 with attribution required. rev 2017.10.31.27598 (see the site footer) - People can and will use your code for whatever purposes they want, but they have to attribute credits. Commented Nov 1, 2017 at 12:47
  • 14
    Actually, you'd be lucky if you got any attention on Code Review at all. Research-level code tends to be too complicated for random Internet contributors to help you for fun. Usually, one would have to read the paper just to acquire the background necessary to understand the code. If you aren't willing to open up completely, I doubt that anyone would take the time. I've just put a +400 bounty on this question — we'll see if that even does anything for you. Commented Nov 1, 2017 at 21:16

10 Answers 10

16

In code reviews, you kind of need to know what the goal of the program is, otherwise the people looking at your code are essentially just 'human linters'. So depending on the type of feedback you want, you might have to explain a bit what your code is doing.

So the core issue would be that you are explaining your idea, and someone else can run with it. Well, it's the internet, if you make it public there is no way of knowing what people are going to do with it. You could indeed just ask for simple code verification (syntax, naming, obvious errors) but without context they can't verify if your code does what you think it does (helpful part of a code review).

If your degree isn't purely in software engineering, they might not really care if your tool is written in an 'optimal way' though. Best bet would be to keep it offline then, or ask some friends whom you trust to review your code (through private github gists for example).

One other solution would be to read up on some material regarding code quality. Code Complete2 is a good start. Other than that, check out C++ code on github from larger projects (Unreal Engine for example). If you find it valuable to write good code, this will help you more in the long run ;-)

2
  • All the answers and comments are quite helpful. I chose your answer because it suggested avenues for learning good C++ coding practices.
    – a_sid
    Commented Nov 3, 2017 at 23:24
  • Please make sure it's obvious in your answer that incorrect code is explicitly off-topic on CR. You don't go there to get bugs fixed. (If your code happens to have a bug, though, that's not a big deal, but "obvious errors" seems to be mutually exclusive with "subtle bug that you didn't notice after some testing")
    – anon
    Commented Nov 6, 2017 at 5:06
103

In addition to all the good answers you received so far, I should also point out that in general people's fear of being unethically scooped is vastly exaggerated. I would imagine that there really isn't a community of people scouring the Web for master's thesis level research that they can find and then, with considerable time disadvantage to the original author, copy. I say "with considerable time disadvantage" because even if somebody finds your work, they still need to reverse engineer a lot of what you already have and know to get to a publishable thesis or paper from your code alone. Unless you consider letting your work sit for half a year it seems unlikely that a copycat will end up publishing quicker than you, the original author.

Yes, being scooped sucks, but it usually does not happen because somebody stole your code, or even your idea. Scooping happens because there are multiple independent teams working worldwide on almost any mainstream research topic, and there usually only are a finite number of ways to attack any given problem given the current state of literature. Situations where two teams are working with similar approaches on similar problems are bound to come up.

34

Posting code on the Internet is somewhat like posting a preprint¹. Everybody can see it, use it, and be inspired by it, and that’s fine if they reference you as the source of this, but of course somebody can also come along and claim that they had the same idea independently and rush a publication before you (which would constitute plagiarism if they hadn’t). Even if the latter happens, you can still refer to your time-stamped post/publication to establish priority and to get at least a piece of the credit cake.

There is one major difference though: In fields where preprint servers such as the Arxiv are properly established, plagiarisers may not be very credible when they claim that they were did not know of your prior publication. Being oblivious to something posted on Code Review, on the other hand is always a plausible claim – unless the plagiariser left a trail interacting with your post.

Some other factors to consider:

  • How much of your result is contained in your code? At least for my work, any piece of code reasonably fitting into a Code Review question at most gives you a hint of the bigger picture. If the same applies to you, it is extremely unlikely that somebody sees your code, recognises its relevance, and rebuilds the rest of your work around it.

  • How easy is it to rebuild your work from your code? For example, if you spend a considerable time figuring out the value of some parameter (and do not give it in your example or modify it), somebody else would have to reiterate everything leading to your parameter. Also consider that if a considerable amount of creativity, research skill, and subject knowledge are required to rebuild your work, somebody able to do this can also produce original research with less effort and risk.

  • How narrow is your field? If only a small community can appreciate and plausibly reproduce your work, it also needs somebody from this community to recognise and plagiarise your work from your code.

  • How relevant is your result? Given that we are talking about a master’s thesis, it is unlikely to be very big. Of course, it’s not impossible, but you can judge yourself from the feedback you should have received from your supervisor. The less attractive your result, the less likely it is for somebody to take efforts and risks in plagiarising it. Again, most researchers probably have better things to do, e.g., performing their own research.

¹ Also see this question of mine regarding the plagiarism of pre-prints.

8

The moment you post something on the internet, you should be willing to live with the consequences of people running away with it. Code Review is no different in this regard.

Yes, there are rules in academia against plagiarism. Yes, Stack Exchange has a Copyright Policy (here, paragraph 15). But there'll always be people around breaking the rules, so none of those will guarantee people won't run with your idea.

Whether or not it will impact the novelty of your idea, I'd suppose that depends on who gets his piece published faster. As long as yours is published before that of any rogue plagiarists, I don't see a problem.

4
  • 1
    Imho this is only right for StackExchange content. On the bottom right you can find "user contributions licensed under cc by-sa 3.0 with attribution required. rev 2017.11.1.27612" Commented Nov 1, 2017 at 23:32
  • @FabianBlechschmidt Well, that's what the question is about, isn't it?
    – Mast
    Commented Nov 2, 2017 at 9:42
  • I think we have a misunderstanding SE content as in "the content and stuff the company SE creates" ... user contributions are CC and therefore it isn't even plagiarism but everyone is allowed to use it as long as they state with the license :-) Commented Nov 2, 2017 at 10:33
  • Ah, I see what you mean. Yes, that paragraph only covers content on the SE network infringing other copyrights, not the other way around. That part is covered by the cc by-sa like you stated.
    – Mast
    Commented Nov 2, 2017 at 10:54
4

Take into account that it will take time to re-do your work even if someone does run with your idea (unless you are posting the source code of the complete application). I would suggest waiting until you are close to submitting or have submitted a paper - at that point any copycat would have no chance of catching up with you.

3

An issue which I don't believe has been mentioned yet is plagiarism detction software systems. Those are generally pretty blunt tools and it's not uncommon for them to flag earlier drafts of a student's own work if posted online somwhere they know to look.

If your work will be passed through such software you should have been told, and you should read the policies applied to you carefully. Most institutions will carry out a manual review after the software flags your work as copied, and if that review is done properly you will have the chance to point out that the work online is yours. But you may still need to be able to prove that, especially if you post under a pseudonym.

3

If you want a think-tank in a private room, where the discussion and knowledge is closed to the members and all of them accept a confidential agreement, this is not the place.

I don´t know if any site like that exists, but it could be very interesting as a research grid platform.

In any case, if someone fix a mistake in your code, or include any minimal improvement, you have to accept that you are not the exclusive owner of the work due to the contributors.

2

First of all : Does your university requires you to license the program for you masters under the university's ownership or some specific license?

If not, (that is you are the owner of your work), why not publish it on Github under the desired license of your choice.#

This way you can prove the credibility/first authorship of the program prima facie and subsequently seek the improvements/contributions from the community.

If the program turns out to be quite useful and gains significant traction , then this might prove to be a shining badge on your resume.

# Since you are doing masters, I assume you will be making foray into industry at some point sooner or later and for your program to gain traction in industry(read:a shining resume) it must have a permissive license, so if you want a simple license choices instead of researching yourself(or much better consulting a lawyer) you can choose between LGPL vs Apache vs zLib .

2

Simply put, there is no way to prevent someone from grabbing your code and using it in any way they care to, including claiming it as their own. Licenses and legalese are only important to people who care about licenses and legalese. You can put all the copyright notices and license terms into your code that you wish, and it will do nothing to stop someone from copying your code and using it if it's publicly available. You would have to

  1. Find that someone has used your code,
  2. Bring a legal action in court seeking that this person be enjoined from using your code,
  3. Wait until your case finally gets a place on the court's probably-very-crowded docket,
  4. Prevail in your legal action,
  5. Get the court to issue an injunction instructing the party who has used your code to stop using your code, and
  6. If the party does not stop using your code, go through steps 1 through 5 again, and again, and again, until a court finally gets pissed off enough about their orders being ignored (the court won't give a dang about your code - they will care very much, though, if their orders are ignored) that they finally do something like toss the enjoined party into jail for contempt of court or something similar.

If you decide to go this route, make sure you have a large pile of money with which to pay your lawyers.

The alternative is to keep your code under wraps, do your best job with it, and don't let anyone see it until your thesis is published - after which you still won't be able to stop people from using it.

Best of luck.

2

If your concern is credibility, then posting your code to the internet in a forum such as Stack Exchange can be used to prove ownership. There is a complete edit history including timestamps. So it is third-party verifiable, untamperable, with an independent and transparent chain-of-custody and publicly accessible. That is rock solid proof of possession as of the timestamp.

Also, you own the copyright to your code the moment you write it.

So the internet post could help prove it's yours if there is ever a dispute.

You must log in to answer this question.

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