In Barack Obama's memoir, Dreams From My Father, Obama opposes racism by confronting it in its presence and in its absence.
In the first chapter, Obama talks about his father's time as a student in Hawaii. He says of his father:
"But if his assessment is rather clear-eyed, he is careful to end on a happy note: One thing other nations can learn from Hawaii, he says, is the willingness of races to work together toward common development, something he has found whites elsewhere often unwilling to do."
Obama addresses the racism in Chicago that is both prevalent and wounding. People have had to learn to live with this attitude, and he contrasts this with the state of Hawaii. Hawaii is home to incredible diversity and his own father observed that the diverse races were willing to work together for the common good.
Throughout the book, Obama traces his own journey of racial identity, since he is the son of an African man and a Caucasian woman. In the introduction, he states:
"Some people have a hard time taking me at face value. When people who don't know me well, black or white, discover my background (and it is usually a discovery, for I ceased to advertise my mother's race at twelve or thirteen, when I began to suspect that by doing so I was ingratiating myself to whites), I see the split-second adjustments they have to make, the searching of my eyes for some telltale sign. They no longer know who I am."
By confronting other people's attitudes and generalizations toward race, Obama demonstrates his own knowledge about the matters that divide people and ways in which we can overcome them.
Obama has ample opportunity to point to racism as the reason for many occurrences in his life, but he refuses to do so, which is another way that he opposes racism. Consider his conversation in chapter four with his friend Ray. Ray is lamenting the fact that girls will not go out with either of them just because of their race. Barack responds:
"All right, here's what I'm saying. I'm saying yeah, it's harder to get dates because there aren't many black girls around here. But that doesn't make the girls here all racist. Maybe they just want someone who looks like their daddy, or their brother, or whatever, and we ain't it."
Barack Obama's own life experience helped him oppose racism. He grew up in Hawaii, full of diversity, and Indonesia, where he attended a Muslim school and a Catholic school. His formative experiences were of learning about other cultures and religions that most people only read about. Obama experienced them. For this reason, he grew up with an understanding and respect for differences, rather than a desire to exploit them or be fearful of them.
Another way he opposes racism is by seeing it for what it is, and he refuses to buy into the status quo acceptance of racism. In his time in Chicago as a community organizer, he had mentors who told him that Chicago was polarized and that politicians used that fact for their own advantage. Here are Obama's thoughts on that subject:
"Each image carried its own lesson, each was subject to differing interpretations. For there were many churches, many faiths. There were times, perhaps, when those faiths seemed to converge—the crowd in front of the Lincoln Memorial, the Freedom Riders at the lunch counter. But such moments were partial, fragmentary. With our eyes closed, we muttered the same words, but in our hearts we each prayed to our own masters; we each remained locked in our memories; we all clung to our own foolish magic. A man like Smalls understood that. He understood that men in a barbershop did want their victory qualified. They wouldn't want to hear that their problems were more complicated than a group of devious white aldermen, or that their redemption was incomplete. Both Marty and Smalls knew that in politics, like religion, power lay in certainty—and that one man's certainty always threatened another's."
Obama observed these things but refused to believe that it was the way things had to be. He stood against this way of thinking and believed that it could and would be overcome.