I see the corruption issue largely as a result of the massive inequality-- which, like the U.S.'s inequality, tends to fall along racial lines-- and politicians have been great at exploiting it to their advantage with help from the monopolistic mass-media. Ideally a shift towards internet and social media will increase transparency and reduce corruption and the social programmes will smooth out inequality in the long run. IMO the Brazilian culture of jeitinho, taking advantage of opportunity where it arises, is very close to the America entreprenuerial spirit but adapted for an environment with a weak rule-of-law.
So the optimism is because all the fundamentals are there -- a growing, young, tech savvy population that loves social media & open source and a government using a commodities boom to invest in education and social programmes. There are plenty of startups-- http://www.predicta.net, for instance, or follow this blog: http://startupi.com.br/ Obviously it's all very fragile but I remain hopeful, the people are amazing and there's nothing I'd like more than to be able to go back.