Brazil is renowned for squandering its feasts resulting in famine.
For example, it has very large oil reserves, and at times has had enormous wealth. After its first boom, they decided to spend all that money on a new capital city, on a great mesa without any resources, in the middle of a desert. They hired some of the most expensive avant garde architects in the world to produce a place that is unlivable. With all of their effort in aesthetics and none in utilitarianism or ergonomics.
Meanwhile, the rest of the country was destitute and starving. At the same time, a filmmaker did a starkly realistic, cruel and unforgettable movie about a family slowly starving in the perpetual drought of the countries northeast, called “Vidas Secas” (Barren Lives) (1963).
http://www.imdb.com/title/tt0057654/reference
This is not a pleasant or uplifting movie.
Fortunately, this time, with the enormous surge in oil prices in the early Obama years, Brazil again had a huge amount of money. So this time they decided not to squander it or achieve anything useful with it at all, and elected a socialist president to waste it as fast as possible.
And that is why the commodity boom didn’t help them. When something “belongs” to everyone (usually called the people, but they mean the government), it fails.
Hey, they need to bring Bernie Sanders down there and show them how socialism can work! He promises it will.