Stack Overflow began be telling their community to "be nice," but over time that proved to not be enough to ensure a safe place for the developer community. Tim Post, Director Of Community Strategy, writes on the Stack Overflow blog:
Our CoC is what we call a living document. It’s designed to change over time to ensure that it remains relevant by continuing to meet the needs of our communities. Every six months or so, we plan to find out how folks feel about how things are going by asking both new and experienced users about their recent experiences on the site.
Hopefully this change leads to a less toxic experience.