Skip to Main Content

Formulaire de recherche

IEEE Citation Guide

This tab has been created to help students cite source code properly in their assignments, reports, etc. 
To publish a journal article or a conference paper, follow the publisher's or organizer's guidelines regarding the citation style and the source code citation.

Source Code

Source code is "the statements written by the programmer, which are translated into the computer's 'machine language' by programs called 'assemblers', 'compilers' and 'interpreters'." (Source)

There are two elements associated with source code:

  • Copyright: Source code is published under licenses, which mention the conditions of use. If there is no license, assume that you cannot reuse the code without permission. Find code that includes a license - ideally, an open source license! (Source)
  • Citation: If the license allows reusing the source code, cite the source.

Ask your instructor if you can reuse code for an assignment!

WARNING! Reusing a colleague's code or assignment, or reusing code from an assignment you produced for another course (= self-plagiarism), constitutes fraud according to Polytechnique's Règlements des études du baccalauréat en ingénierie, art. M7 b) and k).

Licenses

Open source licenses allow software to be freely used, modified, and shared.

Check the license under which the code was published to see if you have the right to reuse it.

Licenses in GitHub

License in Stack Overflow

Creative Commons licenses

How to Cite Source Code

IEEE is a numerical style that comprises two mandatory elements:

  1. In-text citation [1], numbered in the order of appearance in the text;
  2. Reference for the source [1] in the reference list. See Examples of references in this guide. The format of a reference depends on the type of document (here, an e-book with DOI): 

O. Manasreh, Introduction to Nanomaterials and Devices. Hoboken, NJ : Wiley, 2011. [Online]. Available: https://onlinelibrary.wiley.com/doi/book/10.1002/9781118148419

Source code from websites and documents with a URL

Source code from documents with no URL

When to Cite Source Code?

  • When you reuse or modify code created by someone else.
  • Whether you reused a few lines of code or an entire module, you must cite the source.

Do not cite common facts (= common knowledge), but when in doubt, ask your professor and/or cite!

Ex. of common knowledge: using function calls from an internal or external software library (code library) such as:

Where to Cite Source Code?

  • In the code, as close as possible to the lines of code reused OR
  • In the function header if the copied item is in the function, or in the class header if the copied item refers to the whole class.

Delimit the beginning and the end of the reused code!

Follow the Library on... Facebook Instagram YouTube LinkedIn
Ask a question