A few days ago I laid out what (to me) is the primary writers "rule." Not comparing yourself to others and then moping around because you can't produce as many words or your prose is not as polished on the first draft or whatever it may be. (And most importantly, not hating those that are more skilled in any area than you are. I don't care if they type faster than you do or have a fucking thesaurus in their brain, no hating. It only makes you look shabby.)
Before I go on to commandment number two I thought I would clarify one point that was raised by Scarlett.
If you are in a mutual writing partner or beta-reading situation you may find that it is beneficial to make some comparisons between your work and your partners. That is a different kettle of fish. A) You are making the comparison to someone you know on a somewhat personal level. B) You are both striving to make the other person a better writer/help them strengthen their weaknesses.
My caution is against that general "S. King is a best seller and writes three books a year and I don't understand why I can't do that. I bet he has a group of writers that draft his books for him and then he just puts a little polish and his name on them." You can insert the name of any author (published or unpublished) in there. Don't do that. It's destructive.
Now, for commandment number two.
Writers Commandment Number Two: Thou shalt not compare thyself to another writer for the purpose of making thyself feel better about thine own writing.
This is the one that really gets me. Because I know that I'm good at what I do. (And I'm not saying to adopt false humility about your skills. If you're good, you should say so. Maybe not all the time, but it's okay - more than okay - to own the fact that you do something well.) But I tend to start looking at other work, especially that of other unpublished authors or newer authors, and I think "Hey. I am so much better than they are."
The problem with this is that when you think you are better than everyone else, it is a very small step to the thought "I don't need to work as hard because I'm already good."
Any writer, every writer can always be better than they are now. I can be better than I am now. No matter how much more vivid my prose already is, no matter how cool my characters are, there is always room for improvement.
Don't let yourself get lazy. Don't get caught in the "Well, I'm already better than author X and they're published so I don't have to worry about improving my craft any further." And I know that there are very few who would consciously say/think something like that, but unconsciously is a whole different story. It all starts with looking at something someone else has written and thinking "Dude, they suck."
So, write. Be confident. Don't judge.