Computer Science and the Honor Code
The Computer Science Department takes the Honor Code very seriously and expects students to do the same. The good news is that the vast majority of students will do so. The bad news is that all historical evidence indicates that some students in computer science will submit work that is not their own, shortchanging not only their own learning but undermining the atmosphere of trust and individual achievement that characterizes Stanford's academic community.
There is no desire to create a climate in which students feel as if they are under suspicion. The entire point of the Stanford Honor Code is that everyone benefits from working in an atmosphere of mutual trust. Students who deliberately take advantage of that trust, however, poison that atmosphere for everyone. As members of the Stanford community, we all have a responsibility to protect academic integrity for the benefit of the community as a whole. Please resist the temptation to violate the Honor Code by submitting someone else's work as your own.
From the amount of attention the department pays to the Honor Code, some people assume that any discussion of assignments is somehow a violation of academic principle. Such a conclusion, however, is completely wrong. In computer science courses, it is usually appropriate to ask others—the TA, the instructor, or other students—for hints and debugging help or to talk generally about problem-solving strategies and program structure. In fact, students are strongly encouraged to seek such assistance when needing it.
The purpose of this page is to make expectations relating to the Honor Code as clear as possible. The basic principle is that each person is expected to submit his or her own work. In particular, attempting to take credit for someone else's work by turning it in as one's own constitutes plagiarism, a serious violation of basic academic standards. These guidelines are a reasonable baseline for academically appropriate collaboration within the rules of the Stanford Honor Code, though specific classes will have their own rules. Doing your best to follow the established guidelines will substantially reduce the likelihood of violating the Honor Code as a CS student. For more information about university-wide Honor Code policies, please see the Honor Code website.
Indicate on your submission any assistance received.
Making use of such assistance without giving proper credit is plagiarism. When submitting assignments, provide proper citation. This is typically done in the comments at the beginning of the program. Also, when receiving assistance, make sure it consists of general advice that does not cross the boundary into having someone else write the actual code. It is fine to discuss ideas and strategies, but be careful to write your programs on your own.
Do not share actual program code with other students.
Do not give your code to any other student who asks for it and do not ask anyone for a copy of their code. Similarly, do not discuss algorithmic strategies to such an extent that you and your collaborators end up turning in exactly the same code. Discuss ideas together, but do the coding on your own.
Do not look at solutions or program code from other years.
The prohibition against looking at the actual code for a program has an important specific application in computer science courses. Developing a good programming assignment often takes years. When a new assignment is created, it invariably has problems that require a certain amount of polishing. To make sure that the assignments are as good as they can be, Stanford's department, like most others in the country, reuses assignments over the years, incorporating a few changes each time to make them more effective.
Beyond being a clear violation of academic integrity, making use of old solution sets is a dangerous practice. Most assignments change in a variety of ways from year to year and submitting a program that solves a previous year's assignment perfectly while failing to solve the current one is particularly damaging evidence of an Honor Code violation.
Be prepared to explain any program code you submit.
When seeking help on an assignment, strive to improve your level of understanding and do not be satisfied with simply get your program to work. Suppose, for example, that someone responds to your request for help by showing you a couple of lines of code that do the job. Don't fall into the trap of thinking about that code as if it were a magical incantation, something you simply include in your program and don't have to understand. This puts you in a poor position to solve similar problems on exams and prevents you from learning necessary concepts and ideas.
Most of the students charged under the Honor Code have committed fairly egregious violations. Students, for example, have rummaged through paper recycling bins or undeleted trash folders to come up with copies of other students' programs, which they then turn in as their own work. In many cases students take deliberate measures—rewriting comments, changing variable names, etc.—to disguise the fact that their work is copied from someone else. Don't waste your time doing this. There are simple, effective, automated tools that can easily see past such cosmetic changes and determine that copying has occured. Programming style is highly idiosyncratic, and the chance that two submissions would be the same except for variable names and comments is vanishingly small. Programs with such similarities must be reported as Honor Code violations.