There has always been a lot of cheating in the programming assignments I mark. This is a collection of advice to the would-be cheater about how not to go about it. All of these rules are based on actual events I have had to deal with.
Don't copy garbage
If you're going to copy someone else's work, first make sure it's worth copying. There's no point in copying an assignment that's worth less than 50%, and there's especially no point in copying an assignment that's worth less than 30%.
Don't leave the typos in
Certain types of grammatical and typographical errors stand out in people's memories, especially if the person doing the marking is a known pedant. If you don't want grammatically pristine assignments, at least swap the errors for different ones.
Don't leave the other person's name on it
Need I say more?
Don't copy stuff you don't understand
If you're going to be asked questions about it, at least read through a couple of times and make sure you can answer the most basic of questions, like "What does this button do?" and "Do you even know what the assignment is?"
Don't copy the wrong assignment
Before you copy an answer, make sure it's answering the correct question. At the very minimum, make sure it's an assignment for the correct course.
Don't leave out important bits
By all means, leave out bits. It might make your copied assignment look different enough to get away with. But don't leave out the bits that actually answer the question.
Don't be marked directly after the person you copied
There's nothing more obvious than marking two identical assignments one after the other. Especially if both are late.