When I went to interview people last year in Vigario Geral, a barren brick shanty-town neighbourhood in the northern flats of Rio de Janeiro, I first went through the mandatory formalities.
I found someone who knew the slum intimately, and had her phone up the drug gang that controls it and ask them not to kill the blue-eyed guy who'd be visiting tomorrow. Crossing the railway bridge into the neighbourhood, I was met by a boy of perhaps 16 clutching a 9 mm pistol. He checked my name and waved me past two equally young colleagues slumped in plastic chairs with rifles on their laps.
Given that ordeal, plus the isolated and densely crowded look of the place, the appalling poverty figures prevalent in these neighbourhoods and the fact that Brazil has one of the widest gaps between wealth and poverty in the world, I would have expected this to be a pretty helpless place. As anyone knows who has seen City of God - set in a slightly less dire Rio favela - these people are penned in by hard drugs and the highly armed gangs that move them, by terrible piecework jobs and sometimes squalid conditions. Coming from outside, life in the favela looks like the very definition of a "culture of poverty," a set of behaviours that pin families down for generations.
Yet, despite all the things that could trap you in destitution or kill your children here, despite the grating frustration, it was hard to find anyone who did not have a very specific and carefully worked-out plan to get their children through university and build a better life, using painstaking savings and real-estate investments on the resale value of their self-built shacks (which they did not legally own - a fact that is not a barrier to functioning property markets). One Rio favela family in five has a broadband Internet connection, and almost everyone was fluent in the worlds of investment, entrepreneurship and education. And people weren't resigned to their poverty; they were frustrated to the point of fury that their plans weren't working out.
Forty-four years ago, an American scholar named Janice Perlman entered these same favelas for 10 years of study into what was then fashionably known as "marginality" - what was believed to be the distinct culture of the destitute who "isolate themselves in parochial ruralistic enclaves rather than take advantage of the wider city context," as she wrote.
Her years in the slum and her thousands of interviews shattered that belief to the core, and her 1976 book The Myth of Marginality gave the world a new understanding of poverty: It is a condition that people pass through, not a disposition or a culture.
"I have found the prevailing wisdom completely wrong," she wrote. The mud-floor-shack dwellers "do not have the attitudes or behaviour supposedly associated with marginal groups … in short, they have the aspirations of the bourgeoisie, the perseverance of pioneers, and the values of patriots."
Beginning in 2001, Ms. Perlman, a professor of planning at Berkeley, returned to the slums of Rio, today far more violent than they were in the 1970s, to see what had happened to her theory. Her new book Favela is a crucially important examination of the nuts and bolts of urban poverty, the things that work and those that don't; it should be required reading for the leaders of China, India and Bangladesh. It is often a despairing work, describing shattered dreams and stupid policies that have ruined lives; it is also a profoundly optimistic one.
Returning, she found that, amidst the murder and cocaine and street-vendor lifestyles, there was more optimism than ever. When asked, "Will your life be better in the next five years?" only 12 per cent in the favelas had answered "yes" in 1969; today, 64 per cent do. They have good reason: There is "significant upward mobility among favela residents relative to the population of Rio as a whole," in both financial well-being and educational income.
Economist Deepa Narayan, in the huge study of 60,000 poor people in 15 countries she and her World Bank colleagues conducted last year, found that Ms. Perlman's conclusions were universal: "We find very little evidence that poor people are trapped in a culture of poverty," she wrote - even in the poorest countries, Ms. Narayan found that poverty in almost all cases is a "condition, not a characteristic" - something that people pass through, and make plans to escape.
"What has often been seen pejoratively as a 'culture of poverty' is not a culture at all," Ms. Perlman concludes, "but a pragmatic response to coping with a harsh reality. If the urban poor had the opportunity to use their energy and skills to earn a decent living … their purported self-defeating beliefs and behaviours would disappear."
The poor are not always with us. They know exactly how to leave, if we can only give them the basic tools to do so.