I'll start my post by saying that I shared (various) houses with my (now) BFF for 12 years. We started sharing because I had just split with my (then) fiance, she was living in a room in a shared house with people she HATED and it just made sense for us to share rent.
It wasn't sunshine and roses all the way through - particularly when I was dealing with mental health issues - but she is now my "sister" and I love her more than (almost) anyone - it is a Very Close Call between her and DH, just because she's been there for me for longer than him.
Early on, we decided that we would live "en famille" - with all bills being split 50:50, us eating together wherever possible, and sharing the chores. I tended to do the cooking (because I like it more than she does), she did the washing up. I cleaned the bathrooms, she cleaned the kitchen. As long as there were no health issues (mouldy food etc) we could keep our bedrooms as we liked. We shared the cleaning of the joint living areas (doing it together on a weekend morning).
We set up a joint account for household expenses - including groceries - and both had a debit card linked to the account. This meant there weren't arguments about who bought the last set of toilet rolls or that the other person hadn't bought milk or butter for months but was still using it.
If your roommate does something that bothers you, tell them right away: "What you did there was not cool."
Don't save up grievances over the past couple of months and write them in a letter.
At first, this was hard. But it got to the point where, like family, we could say what was on our mind, potentially have an argument, get it out of our systems and then get on with life. DH still doesn't quite get this. However, if you're not the type of person who can do this, then it can be quite difficult.
You had a bad day. I, your roommate, am sorry and I sympathize. However, I honestly do not want to hear about it All. Evening. Long.
BFF and I brought in an arrangement whereby we would each have 15 minutes straight after work where we could bi*ch about our day and get it out of our systems. Generally, this would be while we were preparing dinner (I would do dinner prep while she did kitchen cleaning or dealt with the cats or whatever). This meant that by the time it got to eating, we were out of the "stress-work" headset and ready to enjoy our evenings.
My biggest tip for anyone in a room-mate situate is choose your person carefully. You may *love* partying with this person, but you can't party ALL WEEK. You have to go to work or college or whatever. Find someone who has similar opinions in terms of living style; if politics (or whatever issue) is important to you, it will be harder to live with someone apathetic about that than to live with someone who is equally passionate but of an opposite opinion. However, if you're obsessive about tidying and cleanliness and you live with someone who tends towards slobbiness, there will be problems.