Cooperation vs. Cheating

The purpose of lab exercises is not primarily to earn points, it is to acquire knowledge -- among other things, so that you pass the exam. It's important that you do the exercises yourself (together with your partner), and do not just use someone else's solution. Of course, you may get stuck, and in that case you should ask for help. Solving the exercises with help is perfectly acceptable: that is why we have tutors! It can also be useful to discuss the problems with your fellow students, and this is also perfectly acceptable -- even encouraged.

However, when you ask a tutor for help, he or she will not give you a complete solution. Instead, your tutor will look at what you have done yourself, try to see where you have a problem, and give you a hint to enable you to make progress -- for example, "use a list comprehension", "try recursion on X", "you might find function F useful". When you discuss the labs with your friends, you should neither give nor receive more than such hints.


You may not include code written by anyone other than yourself or your partner in the solution you submit, whether or not you make modifications.

You may not allow another person to make use of code which you or your partner wrote. You are responsible for ensuring this does not happen.

The lab exercises are part of the examination of this course; cheating on a lab is as serious an offence as cheating in any other exam.

Most students never consider cheating, of course, but we know from experience that a few will be tempted. Therefore it is important to state clearly what is allowed and what is not, and it is important that you read this page.

How can I prevent others from using my code?

In particular, be careful if you store your solution on the dtek system. This is set up so that users can read each other's files, and in the past cheats have stolen solutions from other students' dtek directories without their knowledge. You can prevent this by making the directory where your solutions are stored private. To do so, change to that directory and use the shell command
 chmod go-rwx .  
(Note the dot at the end of the line!) Of course, it is also safe to store your solution on your own computer.

You may, if you wish, change lab partner during the course -- you do not need to do every lab with the same partner. If you do so, you should ensure that your former lab partner has no access to your code.

The deadline is near and I am not done -- what should I do?

No problem -- submit what you have done. There is no shame in submitting an incomplete solution, indeed it's expected that some of you will. Your tutor will not pass you, but this doesn't matter: he or she will simply return your solution to you, and give you more time. Moreover, your tutor has a chance to see where you are stuck, and to give you the help you need to enable you to finish.

What happens if I am caught cheating?

Of course, you will be failed on the lab part of this course, which means you will have to repeat it next year. You will also be reported to the President of Chalmers, who will send your case to Chalmers' Disciplinary Board. The disciplinary board can impose a variety of penalties, ranging from a warning, through suspension for up to six months, up to expulsion from Chalmers in the most serious cases. Suspension means you are not allowed to take part in Chalmers teaching or exams, and (of course) you cannot receive studiemedel during that time.

You risk these penalties even if another student copies your code without your knowledge.

What if I disguise code?

Most cheats attempt to disguise the code they have copied, for example by changing variable names, but disguised code is far more obvious to an experienced programmer than cheats seem to believe. It is amazing, really, to see what simple modifications some people think will make code unrecognisable.

Disguising code effectively is actually a very difficult problem. Microsoft alone spend millions on research in this area, so they can "obfuscate" the code of their products to prevent their competitors from decompiling and understanding them. Since detecting cheating is a high priority for Universities worldwide, advanced automatic detectors have been developed, which are proof against any disguise a student is likely to think of.

Ask yourself this: if you cannot even solve an introductory programming exercise, do you really think you can invent a new way of disguising code which the world's Universities have not already found a way to detect?

We will be using an advanced anti-cheating tool on this course to compare all submitted solutions with each other automatically. I also have previous years' solutions available to compare with. If you cheat, we will know.

The only safe way to disguise code is to rewrite it from scratch, using a different method.


I know most of you would not even consider cheating, and I am preaching to the converted. We are working together with a common goal: for you to learn. That demands an atmosphere of trust. In the past, a few people have violated that trust, which I found personally very upsetting. There are few things worse than discovering that someone you are trying to help is, in return, trying to deceive you. This year, I hope that none of you will.

You can also usefully read KTH's Code of Honour, (in Swedish) which puts what we expect of you very well.

Last modified: Wed Sep 18 10:46:01 MET DST 2002