Don't give food or hot drinks: many people who are homeless or very, very short of cash 'freegan' it, i.e. they get food (past shelf-life but still perfectly safe to eat) from supermarkets' or sandwich shops' litter bins. When they close up, some sandwich shops' staff also pack up any left-over sandwiches, bread rolls etc. and offer them to homeless people.
Really useful gifts include: spare underwear, t-shirts and socks; tissues (which can also be used as toilet paper); small bottles of shampoo/sock/toothpaste (not big ones as homeless people have to carry their possessions with them all the time); periodic towels and tampons for women. Also hats, scarves and gloves in the winter.
'The government' doesn't always help. In my country, people are supposed to get help from their relatives, even if they come from broken homes, had abusive parents, and social services intervened when they were kids. I guess it would be more or less the same in the UK, and that 'Baby P', had he reached adulthood, might have ended on the street.
Drug addicts and alcoholics are usually easy to identify, once you've seen a couple of them. They also insult you when you try and give them your little present of toiletries/spare clothes, while people who became homeless because of no family + no job will be ever so grateful and will 'cling' to you: most passerbys act as if they're invisible, so when someone does look at them and even initiates contact, they're over the moon!
Some drug addicts who beg in the city centre, claiming to be homeless, actually have roofs: sometimes it's only a squat, but other times, they are living in council housing, or even in accommodation paid for by their parents. So the money is probably not going to be spent on accommodation, although occasionnally I've had to share a hostel's dorm with tramps (which I didn't enjoy as they fell in the smelly, boozy category).
Where I work (call centre workers, mostly), we've had some temps (British graduates) who rented... beds in a dorm in a backpackers' hostel! They couldn't even afford a houseshare... (and the cheapest houseshares would be too dodgy anyway). Another temp (also a graduate) had a bright idea: enrol at a gym that is open 24/7 and spend your nights there (you can sleep on a bench, if you're lucky, and you can take a shower!).
Say, I'm housesharing with a live-in landlord, I lose my job, and he kicks me out: I won't be able to find rental accommodation on JSA, I won't be able to find a job while living on a street... it's a vicious circle...