This is a balance, because if you're going to write to be traditionally published then you have to look at the market. A publishing company is never going to take on your book if they don't think that they can sell it.Occasionally books get published that defy the trends, but this is more the exception than the rule.
Also, if you write in a certain genre you have to be aware of the genre conventions. There is a reason why a person decides to go into a bookshop and go to a certain section. The conventions are not hard, fast rules, but you have to give the reader a certain framework.
Ok, so we've gotten that out of the way. One of the biggest mistake that a rookie writer can make is to write with other people in mind. This can take several forms, but there are two particularly bad forms.
#1: Letting other people's opinions interfere with the plot. When you think properly about writing a book, you realise that if you publish it everyone that you know is a potential reader. Your mother in law, that neighbour down the road who hates your guts, your co-workers.You can't pick certain people and tell them that they can't read it. So a writer starts to think, I better tone down that sex scene, they may think that I'm some sort of nymphomaniac or My character can't talk about how much she dislikes her sister in law, in case my sister in law thinks that I'm saying that I dislike her. Some people probably will think that facets of your character are based on yourself, but you just have to remind them that it is fiction. You have to be true to your characters, and your plot. As long as you're not writing thinly veiled autobiography, you should be fine.
2: Clarifying that your character's opinions are not your own in the main body of the text. If you write about a character that is a racist, people are not going to automatically assume that you are in fact racist. You don't need to do this: " 'Go back to where you came from,' David sneered. Obviously, racism is wrong but David was so full of rage at life that he didn't care about other people and the fact that we are all humans regardless of race."
Your characters are separate from you, and an intelligent reader is well able to separate the attitudes of a character, from that of the author. The above is unnecessary and takes away from the scene itself.
*Do you find it hard to write for yourself and not other people?*
*I'm on holiday, but I'll respond to any comments when I get back*