Code of practice concerning use of non-orginal code in COMP26120

Pete J. Jinks - Joshua D. Knowles - Milan D Mihajlovic - David E. Rydeheard - Jonathan L. Shapiro


Many students have used code found on the internet as part of their solutions to the lab exercises in COMP26120. This is often a reasonable thing to do. As professional programmers, we have access to the entire literature on algorithms and often solve problems by using existing methods. The purpose of this document is to make explicit the policy of the University and of this course-unit on this issue.

The first two principles below apply to all programmers, not just to students and not just to students of COMP26120. You have a responsibility to clearly state your sources.

The third principle makes explicit that sometimes, in COMP26120, to help you understand how certain important algorithms work, we will need to require that you create them yourself from scratch. Within COMP26120, we have a responsibility to make that constraint clear to you, when it applies.


Principle 1: You must fully credit sources of information in your code.

This means that if you take an algorithm from the internet or a book or any other outside source, you need to state clearly the source in comments in your code. This holds whether or not the code was taken verbatim or converted from another programming language, pseudo-code etc. To do otherwise violates the ACM Code of Ethics and Professional Conduct (1.5, 1.6) and the University of Manchester code of practice (Academic malpractice) and will be treated as plagarism, which is a serious disciplinary offence (Conduct and discipline).

Principle 2: You are responsible for the correct working of your code, even that part of it which is from outside sources.

This means that you need to test the code and should try to evaluate the quality of its source.

Principle 3: Unless a problem description explicitly says so, you may not use other people's work in your answers.

For some assignments you may use code taken from outside sources, but you may be marked down for doing so. This will be clearly stated in the problem description, as follows:

Further comments and an example

Principle 1 follows obviously from intellectual honesty - you must not pass off the work of others as your own. This is not just a rule for students, however. As a professional programmer, this is essential practice. Others who use your code will understand it if they know the origins. They will be able to establish the correctness by ensuring that it is true to the original and that the original is correct. Even algorithm textbooks have errors, and knowing that this code came from a textbook which was later discovered to contain an error, makes it much easier to fix.

The importance of Principle 2 should be obvious. There is a lot of junk available, and even excellent code may be based on assumptions which are not applicable to your situation. Getting code from elsewhere does not remove you of your responsibility to produce code which is correct and working.

It is obvious that we will need you to produce your own implementation to understand some fundamental algorithms. This is the reason for Principle 3. However, whether we are making this restriction or not, you must credit any code you have taken from any source other than your own head, except for that code which we give you. To fail to do so will be considered a case of academic misconduct.

Here is an example of how to give credit. One of us recently had to generate data from a Zipf distribution. The solution was found in pseudo-code in an out of print book, only available on line. The file containing the code began as follows,

/* This generates integers drawn from a Zipf distribution.
   Follows "Non-Uniform Random Variate Generation" Luc Devroye page 551

/* JLS Sept 23, 2009 */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
double zipf(double a)
[remainder deleted]

About this document ...

Code of practice concerning use of non-orginal code in COMP26120

This document was [originally] generated using the LaTeX2HTML translator Version 2002-1 (1.68)

Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.

The command line arguments were:
latex2html -split 0 -link 0 UseOfOthersCode.tex

The translation was initiated by Jonathan Shapiro on 2009-11-20

Pete Jinks 2009-11-25