Skip to Main Content
It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.

Citing Programming Code - Computer Science and WMDD

Specific Examples of Citing

Code From The Web

Provide as much information as available.  If there is no author, version number or date, leave it out.

Title: Selection Sort
Type: Source Code

public void selectionSort(int[] arr) { 
  int i, j, first, tmp; etc.....

Note For Web Development Assignments

Use the html comment to provide credits and note adaptations.

<!-- Adapted from:

Title: Region GeoCharts
Date: July 20, 2015
Type: Source Code

When embedding a referral url to a script, do not remove any information that has the author's information and/or instruction on how to use the script. 

Example from:

<script language="javascript" src="liveclock.js">

Live Clock Script-
By Mark Plachetta ( based on code from
For full source code, 100's more DHTML scripts, and Terms Of Use,

Code Provided In Class

Title: displayBalance
Author: Instructor Name (e.g. KL Lee)
Date : 05 Feb 2016
Type: Source Code
Availability: Provided for assignment 1 on 15 Feb 2016 for WMDD 4830.

void displayBalance() etc.....

Code From

In addition to the title of the program or source code, add the video title.

Title: binarysearch.cpp
Author: Peggy Fisher
Date: May 23, 2014
Type: Source code
Availability: Up and Running with C++., 2014.  Retrieved from

bool search(int[], int, int);
int main()
 int nums[10]; 

Note that you can find a link to the video by clicking the "Share" button and selecting a "copy link for someone within Langara College".  

Code From An Online Book

Title: Row-by-row Processing
Author: Djoni Darmawikarta
Date: March 2014
Type: Source Code
Availability: Oracle SQL: A Beginner's Tutorial.  Brainy Software, 2014, p. 98.  Retrieved from:

   For inv IN
   (SELECT C_no, etc.....