Skip to Main Content
Go to the Langara College website. Opens in a new window
Go to the Langara Library website. Opens in a new window

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
Availability: http://www.algolist.net/Algorithms/Sorting/Selection_sort
*/

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
Availability: https://developers.google.com/chart/interactive/docs/gallery/geochart?hl=en
 -->

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: http://www.dynamicdrive.com/dynamicindex6/clock2.htm

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

/*
Live Clock Script-
By Mark Plachetta (astro@bigpond.net.au(c)) based on code from DynamicDrive.com
For full source code, 100's more DHTML scripts, and Terms Of Use,
visit http://www.dynamicdrive.com
*/

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 Lynda.com

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++.  Lynda.com, 2014.  Retrieved from http://www.lynda.com/C-tutorials/Up-Running-C/167922-2.html?org=langara.bc.ca
*/


bool search(int[], int, int);
int main()
{
 srand(time(0));
 int nums[10]; 
 etc.....

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: http://site.ebrary.com/lib/langara/detail.action?docID=10882075
*/


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