I've heard of too many people getting hit by cars to walk down the middle of the street unless it was absolutely necessary. That's me though, just my personality. There's a sidewalk for a reason and I use it.
As for being harassed, I've had the cops shine a spotlight on me when walking home...