Before she died in 2016 at age 94, Ann Caracristi, the first female deputy director of the National Security Agency, liked to reminisce about the absurd stereotypes that women had to contend with back when she entered public service during World War II. Chief among these — she found it somewhat amusing — was the notion that women are not as intellectually gifted as men.

Genius is a male trait, it was widely believed in the 1940s. The thinking went that men are the brilliant sex, while women are better suited for tedious tasks requiring humble virtues like patience and focus. Typing, for example. Or filing. Or — in the case of Caracristi, whom I interviewed for a book on female code breakers — sorting and categorizing. In 1942, newly graduated from Russell Sage College, Caracristi was recruited to work in the stuffy attic of a former girls’ school in the Washington area that had been converted to a secret military code-breaking office. The staff, many of them young women like her, sorted reams of intercepted Japanese messages and pioneered new techniques.

Caracristi’s own brilliance soon announced itself: She and her female boss, a schoolteacher from West Virginia, broke a code that enabled the American military to pinpoint the location of Japanese troops. Caracristi would rise to become one of the most storied women in the National Security Agency.

More than 70 years after that war ended, it is astonishing to see doubts re-emerge about women’s ability to do high-level intellectual work. Far from being put to rest, old prejudice has found new expression in naysayers like James Damore, the Google engineer, now fired, who suggested in an infamous memo that women are shut out of top jobs in Silicon Valley because they are not “biologically” suited to the brain work of tech.