Larry Wilmore said that last week out in Aspen. He was responding to a question from the floor. He makes a good point. Moreover, I think stereotypes are generally the result of lazy writing. To the extent that Michael Bay is doing Transformers, I generally expect any black people in camera-range to come off pretty poorly. That said, Alyssa's take is worth reading.
Ethnic humor is, I think, generally effective under a couple of fixed circumstances: a) when it comes from within the minority group being parodied, as with the best of Woody Allen and the Jews, b) it expresses something true that is difficult to say under polite or serious circumstances by carrying something far beyond its logical conclusion or realistic bounds, c) it subverts our expectations or understanding of the group in question, or of the teller. I think 30 Rock in particular has done a terrific job with ethnic humor, whether it's Irish (Season 1, Episode 17, when Alec Baldwin, his father, and his brother, played by Nathan Lane, announce the names of their fists, which are, respectively, St. Patrick and St. Michael, Tip O'Neill and Bobby Sands, and Bono and Sandra Day O'Connor, falling under categories a and b) or African-American (the running feud between Tracy and Twofer fulfills all three categories at once), especially in Tracy's plans for a Thomas Jefferson movie, which refer to the former president as a "jungle-fever haver," while also mocking African-American actors like Eddie Murphy...
The African-American coded robots in Transformers do none of those things. There's nothing clever about suggesting that black people can't read (unlike the 30 Rock episode where Tracy, who writes a column and complains about George Will, pretends he can't read to expose Liz's racism and to get out of work) or to have stereotypically ghetto characters threaten "to pop a cap" in someone or call someone a "pussy." All that coding is racist, sure, but as a cinematic choice, it's worse: it's boring.
What's most amazing to me is that there were actual "black" Transformers in the old cartoon, back in the 80s, who weren't really offensive. And yet as the clock's moved forward, Bay is actually, creatively, gone backward. Oh well. I think I should probably care more that this guy is eviscirating my childhood. I just don't. Maybe it wasn't all of that to begin with.