What the hell do I know, of course!!
Look at the title of this thread, and if you are in accordance with it and don't see the problem with such a statement then good for you.

I like many others have had unpleasant things happen to me. I've been spat at here in London and the person wasn't an immigrant, gypsy or....bla bla what does that mean? nothing to me.
Luckily I haven't been violently robbed/attacked, no that's not true, while talking a nice stroll along a canal my husband and me were attacked by a group of white youths and then when we reported this to the police, we were mistreated in the way they dealt with us, (for which we later got a formal apology).
I just hope all visitors to Spain stay safe and can have a pleasant stay through their travels, and like another member on this board says, develop eyes at the back of your head.
There is no formulae to avoid being attacked or robbed with regards to avoiding people. Simple as that.
On the whole I've had no problems walking alone during the early hours in Madrid or while walking the 'Camino a Santiago' alone and often through the night too.