Basic principle for all this : honnesty paies... in the long run
Most of the bad things happening when you do those things often happen after a long while. If you lie, sooner or later...probably the latter, you're gonna get caught and then your reputation will start going down.
So, the basic principle is to be honnest with others, of course, but also with yourself. It's usually tough because you see all those people during your career escaping from difficult situations by cheating or using shortcuts while you run the whole marathon but, with time, people will reckognize that. That's when it starts to pay and I gotta be honnest, when it starts paying off and you hear about people who are now in trouble because they cheated and go caught... (I'm sorry to be human but) it makes the victory all the sweeter.
But, remember, only in the long run...