I bought a smaller 1950's house in a marginal part of town that was close in and have a housemate. It cost just over 50% of the median price and was just barely on the "wrong" side of the freeway (still had good bus stops). Nowadays it's more like 70% of the median house cost, probably because they moved the old airport from walking distance to my house to outside town and started building a fancy-schmancy walkable neighborhood in its place.
Another idea is to get a house in a place that will let you build a mother-in-law type place in the back, then you can live there and rent out the front place.
Prior to the house, I always lived in dorms or apartments with housemates (or at my parents' house with them).
What is it that you hate about apartments? Being dependent on undependable landlords? Being close to noisy neighbors or neighbors who think you're nosy?