It’s no secret that the University of Maryland’s computer science department doesn’t have the gender diversity it should. As of the 2016-17 academic year, less than one in five computer science majors were women, while male faculty members outnumbered their female counterparts in the department nearly eight-to-one.

The computer science department has done much to bring women into the fold, and the numbers are starting to improve. But eliminating the gender gap isn’t enough; the department must also change its culture and create an environment hospitable to female students.

Last week, the department came under fire after students found misogynistic language in its handbook for teaching assistants. The handbook informed female TAs that male students might challenge their authority or make suggestive remarks toward them, and recommended female TAs remain “[f]riendly but firm” in response. Meanwhile, it advised male TAs to watch for and resist advances from female students, who would be after “the lure of [the] position or (even more callously) a grade.”

The handbook, to the department’s credit, was promptly removed from the site. In a letter released Wednesday, department chair Ming Lin and Computer, Mathematical and Natural Sciences Dean Amitabh Varshney wrote they were “not aware [the handbook] existed on our website.” Regardless of where it came from or how it got to the site, the handbook is a microcosm of a problem women too often face in the workplace, especially in male-dominated fields such as STEM. Evidently, this university is no exception.

More insidious than the advice the handbook provided is the justification it offered. It told female TAs that the “[f]riendly but firm” mantra is “unfortunately the kind of practice you’re going to need at some time in the future,” as “students may not be the only ones who will have difficulty accepting you as a professional.” By contrast, it warned male TAs that some female students “may attempt to capitalize on the male-female dynamic to their own advantage.”

Rather than simply teaching men to not be sexist, the handbook assumes the all too common attitude of “boys will be boys.” It tells women to accept the fact they face discrimination in the workplace, normalizing such bigotry. And at the same time, it cautions men to not let their guard down against the apparently bewitching power of female students. Such a mindset would lead male students to be distrustful of their female colleagues and devalue their work — thus feeding into the very bigotry the handbook tells women they’ll have to deal with.

In its strategic plan in 2015, the computer science department acknowledged it could not “be a world class institution” without more diversity in the workspace, pledging to create an environment “respectful, sensitive, and inclusive of diverse members of society.”

Oculus VR co-founder and former university student Brendan Iribe — the namesake of the computer science building set to open on this campus next year — has already pledged $500,000 to help underrepresented students gain more of a foothold in the department. Over the past several years, the department has made some strides in the right direction. Since fall 2006, the proportion of undergraduate computer science students who are female has nearly doubled.

But even if women become equal to men in number in the department, they won’t have true equality until they’re treated the same as their male counterparts. This won’t happen if we continue to regard harassment and discrimination in the fields as norms impervious to change, and it certainly won’t happen when the boilerplate puts the onus on women to resist bigotry, rather than on men to not be bigots.

This editorial board commends Lin for acknowledging the handbook’s “inappropriate, stereotypical characterizations,” and pledging to create a more welcoming environment for female students within the major. We urge the department to continue pushing for more women faculty and undergraduates in the field. More female role models will encourage more young women to go into computer science, and hopefully, once and for all clear the “boys’ club” atmosphere that shrouds the subject.