1

I am working on a paper and I found open-source code that I could use for running a simulation. Should I write my own code for that simulation? Will it be enough if I refer to the code in my citations/references section?

4
  • How is it licensed?
    – Bryan Krause
    Jan 14, 2020 at 4:51
  • In particular, does it use a "viral" licence like GPL that would impact what you can do with your own code if you use it?
    – ObscureOwl
    Jan 14, 2020 at 9:06
  • 1
    BTW Just be aware code on github with no explicit license isn't open source - opensource.stackexchange.com/questions/1720/… Jan 15, 2020 at 0:39
  • @DavidWayerworth On the other hand, using a copyrighted work for research purposes constitutes Fair Use, though claiming it as your own work would be plagiarism.
    – nick012000
    Jan 16, 2020 at 7:36

3 Answers 3

2

Yes, open-source code can be used for research if it is cited everywhere you use results from it. You may first like to verify that the code is indeed open-source by verifying that the license is one of these: https://opensource.org/licenses

This should be listed clearly on the website/repository/license/readme file. If this is not available, try contacting the author to verify that it is indeed open source.

Certain licenses additionally allow you to freely modify the code for your specific purpose; the link above contains details about this.

2

Open source software is used everywhere. For all example, nearly all of High Performance Computing, and the entire field of Computational Science and Engineering (CS&E) works with open source software, and does so very successfully. Furthermore, these packages are often at least as good or better than what commercial packages can offer. Many of these packages have been used in hundreds or thousands of papers. A few examples of packages just in my field that have very widely been used is here, here, and here.

So yes, you can use open source software. In particular, there is no reason to believe that open source software just by virtue of being open source is of worse quality.

In practice, nearly every software package has one or more paper that describe its inner workings. The right thing to do when you use a package is to cite these papers.

-1

You'll need to conduct due diligence to ensure that the code generating the simulation is accurate and that you fully understand how it is working; otherwise other peoples' mistakes become your own. Personally, I would take that code and deconstruct it to the point I understand how it works, then re-write it on my own. That said, nothing prevents you from using open source code, just be sure to document accurately and be confident it is doing what you anticipate!

5
  • 1
    … which is the same as for closed-source software.
    – Wrzlprmft
    Jan 14, 2020 at 6:18
  • i have found incorrect computations in closed-source software. onus remains on you regardless of the source
    – HEITZ
    Jan 14, 2020 at 6:20
  • 1
    Exactly. I just want to avoid the impression that open-source software is special here.
    – Wrzlprmft
    Jan 14, 2020 at 7:48
  • I might not go that far - depending on the problem a simple black-box validation might be reasonable. But certainly you do need to take, and document, some way of ensuring that the code does the right thing.
    – Flyto
    Jan 14, 2020 at 10:59
  • There is so much excellent open source software out into which people have put tens of man years of work there that it's ludicrous to suggest that for the bigger packages, rewriting is even possible. Let alone for a single person. It's also silly to suggest that that might improve the quality: You'd surely introduce more bugs just because you don't have the resources to write test suites with thousands of tests. Evidence from software design research suggests that the big open source packages are of better quality than nearly all commercial software. Jan 14, 2020 at 20:40

You must log in to answer this question.

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