I'm a cyclist and I'm constantly looking out for them and I still sometimes accidentally walk into them.
One of the biggest problems with New York's new bike lanes is that a great many pedestrians treat them as sidewalks and cops don't give them tickets for it. It totally should be a jaywalking ticket.
That said, perhaps it's situational. My city has large amounts of arterial roads with heavy car traffic and sparse pedestrians. The speed limit on those roads is about 60 kph (about 40 mph), and I much prefer to stay off them as a cyclist. It would be much safer if I was allowed to cycle on the sidewalk in those areas, as there's little to no foot traffic. In the city itself, different matter. There's much more foot traffic, but the speed limit is lower, so perhaps it's best there to be on the road.
I am not saying go crazy and ride your bicycles on freeways. This is more about city streets. That being said, I truly believe the way to have fewer cars striking cyclists is to have more cyclists assert themselves on the road.
I'm also an advocate of taking up a full lane, but the laws in many places (like New York) actually require you to ride to the right/shoulder where feasible. Unfortunately that's not really clearly defined, so even though you have a legal right to a full lane, cops will still give you a ticket.
Having narrowly avoided being doored a few times, I won't ride anywhere within a foot's range of a completely open car door.
Sometimes it's the only sane option. While I can legally ride my bicycle on a four-lane road with a speed limit of 45MPH and no real shoulder, I'd have to be crazy to prefer that to the sidewalk that sees perhaps one pedestrian an hour.
You mentioned you obey the law so you probably don't do this. Even if the law does not prohibit riding on the sidewalk, you should never ride on the sidewalk.
Just wanted to take this time to remind everyone that bicycles do not belong on the sidewalk.