In 2012, my male editor suggested that he would like to have sex with me. I politely declined. Many apologies later, he explained that he really just wanted to be friends. A friendship seemed feasible yet frightening. We worked for the same company, and a power differential existed between us. I told him as much, not that it helped. For a year and a half, as often as I defined my boundaries, he trampled over them. One by one, I shut down our avenues of communication. “Who is this guy who 'likes' everything you write on Facebook?” my parents asked. I quit Facebook. But to remove myself from the situation would have meant leaving my chosen profession, science writing.

Women who choose careers in male-dominated domains such as politics, engineering, publishing, business, mathematics, computer science and science writing know that sexual harassment is par for the course. Unlike most of them, I did not keep quiet. As a simple Google search reveals, the editor who harassed me was Bora Zivkovic, who resigned from his position as blogs editor of Scientific American after I and other women complained publicly about his behaviour.

After I spoke out, other women privately shared with me their stories of harassment by men. Their relief felt palpable. On Twitter, men and women responded with overwhelming support. Yet at the meeting of the US National Association of Science Writers in Gainesville, Florida, last month, I felt anxious when I spoke at a panel dedicated to raising awareness of how women still struggle in the industry: how far behind they remain in terms of winning awards or getting blogging gigs with leading publishing brands. I did not enjoy being the public face of a flurry of interest in the problem of sexual harassment.

Even the phrase 'sexual harassment' is dangerous. Men may run away in fear and assume that any interaction with women can be wrongly interpreted. Women may not know that they are protected against certain actions, and may be nervous about speaking out because of the implications for themselves or for other women.

A few mostly anonymous commenters on Twitter and in the blogosphere have criticized my method of coming forward. I never doubt I did the right thing, but I do not want to set a precedent. History has never looked kindly on witch hunts. Today's self-publishing environment means that defamation can be only a few keystrokes away. My public comments — in a blog post I wrote — could have been avoided. I realize now that if I challenge an offender either directly or through confidential official channels, then both women and men will listen and look out for me. I did not know that before.

“Women may not know that They are protected, and may be nervous about speaking out.”

I have endured various types of sexual harassment throughout my career, from the relatively harmless to the illegal. When I was 16, the editor at my first newspaper job told me he loved me. His habit of stroking my calf muscles communicated that he meant this romantically — not as a compliment on my reporting. A male executive of a different publishing company habitually stopped by my desk, to lightly massage my shoulders and tell me: “What a great smile you have!”

Zivkovic was certainly not the first. But I can say with confidence that he was the last. The experience changed the way I interact with men in professional settings. I am ready to tell them immediately if they step over a line. And if that does not work, then I will simply walk away. The situation has provided me a sort of shield, too, in the way that men may interact with me. If I am labelled as the 'woman who writes about sexual harassment' and kept at arm's length, then so be it.

By now, many in the science community have moved on from discussions of this problem. But the work of raising awareness of and eliminating sexual harassment has not stopped. It continues very vividly in a core, but growing, group of female science writers whom I know and admire. And I continue to ask my female colleagues about their workplace environments. For example, I helped one of my colleagues to send a letter to her supervisor, who was making quite subtle sexual comments. After the letter, the comments stopped. Women and men can seek such small victories every day.

Throughout the conversation, some have claimed that modern women are being overly sensitive. Do we read stories about Marie Curie, Rosalind Franklin or, more recently, Rita Levi-Montalcini or Mae Jemison complaining about sexual harassment? We do not. But for these women, legal protection did not exist or had only just begun.

The law in the United States now is simple enough: “Harassment can include 'sexual harassment' or unwelcome sexual advances, requests for sexual favors, and other verbal or physical harassment of a sexual nature,” states the US Equal Employment Opportunity Commission on its website. The real work begins when a woman is confronted with a situation and must define it. (I focus on women here because, out of the nearly 11,400 sexual-harassment complaints filed to the commission in 2011, only about 2,000 came from men.) That definition can be boiled down to a simple rule that men must follow when they interact with female colleagues. Ask the question: “Would I say this to a man?”