IMHO, everybody involved was, indeed, stupid.
1) Gates, who was understandably pissed about being unable to get in his house, shot his mouth off, and assumed racism. He was, however, supposedly in his home where you don't need to bow to the police, the FBI, or anyone else who, once they realize their mistake - should get the hell out. I guess many here believe a certain amount of cowtowing IS always appropriate where our masters are concerned??? I thought everybody here thought they were citizens not subjects? Politeness to the police, while safe, is hardly mandatory in a republic of equals.
2) The cop, who as a professional, should realize people get pissed and still have the right to be assholes or not in their own house after committing no crime. The proper LEO response to, "Give me your name and badge number!!" is to give it, roll your eyes, and go laugh about it with your friends. I assume the cop WAS an ass, as he reacted as one. American police don't arrest you and drag you from your home for not being respectful enough.
3) Obama, who perhaps knows about assholes with badges, for siding with his friend by calling the cops stupid. Hey, at least he wasn't the typical professional DC slug with the (always smart but dishonest), "I don't know enough about the case to comment."