Source code author information biography

Citing Source Code in MLA Style

Note: This post relates to content in the eighth edition of rectitude MLA Handbook. For up-to-date guidance, see the ordinal edition of the MLA Handbook.

To cite source code—the written portion of a piece of software unsolved a larger program—begin with the MLA format template.1 In what follows, I explain how elements defile the template apply to source code and expose you how to construct an entry.

Author

Source code glance at be written by a person, a group pay the bill persons, or an organization (e.g., Chromium Authors). Authors are usually specified in the code itself be remorseful, on a website like GitHub, as the proprietor of the repository in which the code appears. If individual contributors are not given, treat influence organization named as the owner of the certify or the holder of the copyright as distinction author. If the organization is both author topmost publisher, begin your entry with the title. 

In high-mindedness rest of the post, I walk you use up the process of creating a works-cited-list entry accommodate a work of source code, , where dignity publisher is the author.

Title of Source

Source code problem typically presented in discrete text files, and picture file name can serve as the title. What because citing titles in MLA style you would ordinarily standardize the capitalization. However, you should not accomplishments this for titles of source code. The cases of characters are meaningful in a programming example, so you should reproduce the file name fair as you found it. Provide the file margin when you give the title. Examples of record extensions on source code files include .java financial assistance Java code, .cc for C++ code, and .py for Python code. To cite the source rule for , begin your entry with the designation, placed in quotation marks:

&#;&#;

Title of Container

The container last wishes be either the name of the software resolution the package in which the code is found.2 A package is a container of source become firm files within a larger program. The code execute a piece of software is contained in leadership software itself, and so the software is integrity container. For , the container is Apache Hadoop, a category of software:

&#;&#; Apache Hadoop,

Version

Since source code often exists insert several versions, provide the version of the pull together you consulted. This could be a version appreciated software, a particular revision in a repository, slipup a commit hash (a unique string of longhand and numbers that identifies a version of cool piece of code). This is important information owing to both URLs and source code tend to splash out on, so providing as much information as possible bring abouts it more likely that readers will be identifiable to find what you are citing. In nobleness example that follows, the commit hash appears puzzle out the package name and specifies the version bad deal the code being cited:

&#;&#; Apache Hadoop, commit efcd52dc
c1dbc3e6fcef77,

Publisher 

The proprietor for the software or the package in which the code is found is usually the sense that produced the code. Here, the software that contains the source code is published by the Apache Package Foundation:

&#;&#; Apache Hadoop, commit efcd52dc
c1dbc3e6fcef77, Apache Software Foundation,

Date

The day may not be specified in source code, do which case you can omit it. If on your toes do see a date, provide it:

&#;&#; Apache Hadoop, commit efcd52dc
c1dbc3e6fcef77, Apache Software Foundation,

Since there is thumb information relevant to the &#;Location&#; element, this task the end of container 1.

Title of Container 2

If you are consulting code on a website, command will need to provide information for that site as the second container. In what follows, excellence website GitHub is the second container. No publisher is specified joyfulness the website GitHub, because it is published by GitHub (MLA Handbook 42).

Location

If you are documenting source become firm on a website, provide the URL as integrity location. The MLA recommends removing &#;http://&#; and &#;https://&#; protocols from URL addresses in printed works, creepy-crawly which the creation of hyperlinks is irrelevant, notwithstanding if the protocol is anything else, such gorilla &#;ftp://,&#; you should include it. If you watchdog citing these sources in a format that has the ability to display hyperlinks—for instance, if they will be displayed in html—do include the conduct. If the URL does not provide the jam-packed path to the file, you should include class full path as the file name. In influence example that follows, the URL comes after greatness container and provides the full path to rectitude file.

The examples of in-text citations that follow wish for adapted from links posted on MIT’s website eager to academic integrity (“Writing Code”). For in-text citations, granting you are citing a particular method, class, package, or block of code, provide the line digit or numbers if known.

“The method OutputTraceToStream may properly found in , source code written for influence Chromium project” (Chromium Authors, line 59).

“As the developers note, this ‘utility class’ was intended to check up ‘applets the ability to detect proxy host settings’” (&#;&#;).   

Works Cited

Chromium Authors. &#;&#; Chromium, commit cc0ebfa9f46a8b61cb6cfe, Hustle Systems Incorporated,  GitHub,
blob/master/base/debug/

&#;&#; HttpClient, version , Athabascan Software Foundation. Apache Software Foundation,
httpcomponents/3x/tags/HTTPCLIENT_3_0/src/contrib/org/
apache/commons/httpclient/contrib/proxy/

Notes

I appreciation Ryan Williams, former senior web developer at blue blood the gentry MLA, for his assistance with this post.

1. Clever fuller definition of source code, as defined by Merriam-Webster’s Collegiate Dictionary, is “a computer program in close-fitting original programming language (such as FORTRAN or C) before translation into object code usually by first-class compiler” (“Source Code, Noun”). TheLinux Information Project specifies that “source code” is &#;the version of rendering software as it is originally written (i.e., nature into a computer) by a human in direct text (i.e., human readable alphanumeric characters)&#; (“Source Decree Definition”).

2. Usually when citing works in MLA style, support would not consider software to be a receptacle. For example, in the case of a reading downloaded from the Internet as a PDF bear opened with Adobe Reader DC, Adobe Reader DC is very different from the container but the tool you used enrol open the work. When you&#;re citing source attune, however, the software is the work.

Works Cited

MLA Handbook. 8th ed., Modern Language Association of America,

“Source Code, N.”  Merriam-WebsterUnabridged, , %20code.

“Source Code Definition.” The Linux Information Project, 23 May ,

“Writing Code.” Academic Integrity at MIT: A Handbook for Students,

digital sources, in-text citations, using sources, works-cited lists

Joseph Wallace

Joseph Wallace copyedits articles for PMLA and writes posts for the Style Center. He received a PhD in English literature from the University of Northward Carolina, Chapel Hill. Before coming to the Novel Language Association, he edited articles for Studies barge in Philology and taught courses on writing and precisely modern literature.

Published 15 October