Along at Practical Ethics, Ole Martin Moen is arguing that one shouldn't give money to beggars. I shall leave aside one or two other arguments he makes along the way, and concentrate on the argument he himself treats as decisive. This is that 'if you give money to beggars, you almost certainly spend your welfare budget helping the wrong people'. Moen is supposing, incidentally, that his readership is in the 'developed world', and beggars are the wrong people in the sense that elsewhere there are others who are much worse off. His view is that 'we should give to those who are the worst off.'
The principle implicitly informing what he says is that one should never do good by helping others if, with the same input of time, effort and/or resources, one could do more good for other others than the others one in fact does help. But this is an impossible principle to live by.
First, we may not always know what we need to. If someone close to hand requires or asks my help, it may not be at once obvious to me whether or not the help I would give could be better deployed some other how. Am I to stop at every turn and do a complex calculation in order to decide? Second, even when we do know without difficulty, as is putatively the case with giving to beggars in rich countries - where money is given to help someone who isn't hungry instead of to people who are - the principle that you must always maximize the good you do would forbid all acts of generosity that fall short of being acts with the very best possible consequences. Not only would a world dominated by such a principle be a wretched place for person-to-person relations (except possibly for those living beside the least well-off people in the world and no one else), the principle would also impose a burden of constant calculation and re-calculation of the likely effects of one's generous acts, and their opportunity costs in terms of other possible acts not chosen instead, which might have had a better 'pay-off'.
There are probably other reasons against what Ole Martin Moen says, but I reckon those will do.