You get close-passed (punish-passed) a lot. It's as if car-drivers are more concerned about painted road lines than actual human life, and aren't actually educated on how to deal with cyclists on the road.
Every time you get close-passed, it feels like your soul left your body for a few split-seconds after being electric-shocked by a wind-powered shock collar. (It's really hard to explain unless you experienced it in real life). But of course, when you express your concerns, everyone thinks you're just being a drama queen, and/or should get off the road.

Stay on the road, and do the same thing (stick close to the curb). You'll get used to the dehumanization someday.
Stay on the road, but take the lane especially when roads are narrow, and in intersections. Minimize the chances of being grazed by random (usually unused) side-view mirrors. Counter-intuitive, but works.
Get off the road and ride on the sidewalk, away from this inhumane madness. Clearly the road-laws do not care for actual human safety, only car-logistics.
Stay on the road, but bring a car. There's no use bringing a bicycle to a car arms-race.