I may or may not have cheated my way through classes.
If I was to cheat, I would use the following methods:
1. Break up (or merge) functions
2. Switch ordering of declaration of variables and the ordering of methods/functions
3. Change names of variables/functions
4. Create useless variables to hold state (or condense/remove useless variables).
5. Switch ordering of math operations
As long as you take the time to understand the code you are copying, you won't make an obvious mistake like that while(!true) fail in the article.
The general guideline is to use cheating as a shortcut to the answer, not as a zero effort copy paste.
If I had hypothetically cheated using the above method on ~ 15 major code projects, I wouldn't have gotten caught.