Maintained by: David J. Birnbaum (djbpitt@gmail.com) Last modified: 2023-01-05T16:30:26+0000
All work that you submit in this course must be your own. Submitting someone else’s code (including code that you find on the Internet and then modify) in a way that misrepresents it as entirely your own work is cheating. At the same time, one of the best ways to learn to write idiomatic code is by looking up and learning from explanations and examples. Below are some guidelines for learning from other people’s code while also ensuring that the work you submit is your own:
You do not have to attribute the regular use of regular features of a language, such as XSLT elements, XPath functions and operators, or namespace declarations.
Other than that, you must attribute, as a properly formatted comment inside your code, code that you copy from other sources, whether or not you modify it. A common way to provide ethical attribution is to embed in a code comment the URL of the web site where you found the information (or a page reference to a book, or whatever the appropriate pointer is to your source). This type of attribution is not only a matter of ethics; it also helps if you later no longer understand the code you copied, and need to return to your source to refresh your memory about the context and explanation.
Where you use code that you copy from elsewhere, you must adapt it appropriately to your own use. For example:
Your code must not contain extraneous features that served a purpose in your source, but that are not relevant to your application.
Your variable names must make sense for your context, as must your code comments.
You must understand and be able to explain the purpose of every detail of code that you copy from elsewhere. If you don’t, you are welcome to ask in our Slack workspace for explanations.
Copying code from answer keys to our assignments, even with modification, is expressly prohibited, except that you may use (with proper attribution) information from answer keys that we have already posted and linked to our main course site this semester, that is, answer keys that we have deliberately and explicitly published for use by students in the course this semester.
Finding code that meets your needs (or that can be adapted to meet your needs), figuring out how it works (including asking for help, where needed), and giving credit to your source is learning. Including features that do not make sense in your context, or features that you do not understand, very plainly crosses the line between learning and cheating, since it epitomizes copying without learning. Do not be reluctant to Look Stuff Up and to use what you find; this is what professional developers do all the time. The point is to use what you find ethically: attribute work that is not your own to the original sources and use what you look up to learn to be a better coder, and not to avoid learning.