I've got no problem giving to the homeless but most of those who approach you cold with a sob story are not the ones I give anything to.
However, when I used to work in retail, I was friends with the homeless guy who sat outside the shop and would often buy him lunch and eat with him as we chatted.
He was a nice guy and I could tell he was genuine.
But the fact those who approach you in public out of the blue? You can tell they're not nice from the fact they call you a dickhead when you don't give em anything.