I already found a question handling the case if you got some information from Stack Exchange for my thesis. Unfortunately I did not find anything about the case that I get a solution (not necessarily from stackexchange) for a specific problem.

For example, if I have a problem with a specific part in my code, or if I have to design a circuit, and I run into a problem: What is the threshold of information, i.e. when should I cite the answer in my thesis? Should I always cite Stack Overflow (or the other web page), even if its just for two lines? Where is the threshold?

And how should I do this in my code? Should I rather make a comment block around the specific part of the code, redirecting to SO, or should I simply cite it in my thesis?

  • 1
    Your question on attributing help from Stack Overflow in your code rather feels like something for Programmers SE.
    – Wrzlprmft
    Feb 22, 2015 at 0:02
  • This question is poorly written. The grammar and sentence structure is poor. If you want good answers, then you would do well to spend time to write your questions well. Feb 22, 2015 at 14:24
  • @MrMeritology: Can you give me some suggestions to improve the question, for example which sentences are bad, and why?
    – arc_lupus
    Feb 22, 2015 at 22:11
  • @arc_lupus: The opening sentence is hard to understand. It should be something like "I have already found a question which handles the case of using information from Stack Exchange for my thesis." Feb 23, 2015 at 13:00
  • @arc_lupus I suggest the following: Your first sentence should be a question, ending with a question mark. For example: "In academic Computer Science, what is the best method for citing social media sources such as Stack Exchange?" Then write one or two questions giving specifics of your context. Close with what alternatives you are considering. Feb 24, 2015 at 1:23

1 Answer 1


The important distinction to make here is between:

  1. Intellectual contributions to the actual research/science.
  2. Technical help.

Contributions of the first kind are – roughly speaking – what warrants authorship or, if the contribution is already published, a citation. With other words: If the contribution would warrant authorship if unpublished, it has to be cited. As already stated, this is somewhat simplified and distinguishing between when to cite and when to include as an author can sometimes be tricky, but it should give you a rough idea, as to what you have to cite. Also note that there are other reasons for citing, such as context embedding, which do not apply here, however.

Two lines of code (to take this example) almost always fall under contributions of the second kind: They help you with the tools you need to use for your research but not with the actual subject of your research. It’s roughly comparable to the contribution of somebody fixing the microscope you need for some biological research. Of course, it might be a very helpful contribution that saved you months of work (in which case you should consider mentioning it in the acknowledgments), but it’s not a scientific contribution.

However, the decision may not always be that easy. Apart from the aformentioned authorship criterion (also note the tag on this site for this), asking yourself the following questions might help to solve the question:

  • Is the kind of contribution to your work fundamentally different from:

    • designing the programming language you used,
    • designing or building your CPU,
    • designing or building your microscope?

    If yes, consider citing.

  • Does the contribution affect the results of your research or is it necessary for others to reproduce your research? By results I here mean something like:

    The 666th digit of π is 6.
    The proposed algorithm outperforms the current standard method.

    and not:

    I managed to compute the results before the deadline.
    Unfortunately, the results do not make any sense, probably due to some bug.

    If yes, then you should consider citing. If, on the other hand, you have good reason to assume that somebody implementing your solution in a totally different programming language or calculating everything with pen and paper would arrive at the same results, then you should not cite.

Contributions of the second kind are what, amongst others, you can put in your acknowledgements, where in a thesis it’s usually up to you, who and how many people you mention.

  • Is it worth pointing out the difference between citation and acknowledgement?
    – Floris
    Feb 22, 2015 at 3:56
  • 1
    @Floris: I sort of do now.
    – Wrzlprmft
    Feb 22, 2015 at 10:10
  • 1
    Correction of major and utmost importance: the 666th digit of pi is 5. Oct 11, 2018 at 14:03
  • I totally agree with you, especially the phrase "It’s roughly comparable to the contribution of somebody fixing the microscope".
    – krenerd
    Sep 17, 2021 at 10:34

You must log in to answer this question.

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