Before she died last year at age 94, Ms 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 Ms Caracristi, whom I interviewed for a book on female code-breakers - sorting and categorising.
In 1942, newly graduated from Russell Sage College, Ms 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, sorted reams of intercepted Japanese messages and pioneered new techniques.
Ms Caracristi's own brilliance soon announced itself: She and her female boss, a schoolteacher from West Virginia, broke a code that enabled the United States military to pinpoint the location of Japanese troops. Ms 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 Google engineer James Damore, 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.
When most Americans think about our veterans on Veterans Day, they often think of acts of valour as fixed in an earlier era. But the story of our female veterans, pressed into service at a trying time, can tell us a lot about challenges we face today, as can the contributions of those civilian women, like Ms Caracristi, who played a critical role in the wartime military effort.
In certain important ways, the early 1940s were a progressive, experimental era in which the military recruited from many quarters. That era can give us clues to performing better in all sectors today. During the worst, costliest, bloodiest war in US history, it was an inclusive mindset that helped the Allies defeat the Nazis.
Women were key to any number of wartime advances, but their presence was crucial in intelligence and communications, as well as in the arena that combines both: signals intelligence, or code-breaking.
World War II was a war of encrypted signals. As armies and navies fought in distant corners of the globe, combatants developed myriad code and cipher systems to cloak their radio and telegraph communications, and code-breaking came into its own as a way to eavesdrop on enemy plans.
More than half the US code-breaking force was female - roughly 10,000 women. Many were college graduates who had been shut out of graduate schools and excluded from fields such as mathematics and engineering, and who now had a place for their talents.
Even before America's formal entry into war, women formed an important part of the civilian staff in clandestine offices that were attempting to break Japanese and European systems. One such was Ms Genevieve Grotjan Feinstein, a mathematician who aspired to teach college-level maths but was unable to find any university maths department willing to hire her. She joined a team trying to break "Purple", a cipher-generating machine used by Japanese diplomats.
The team laboured for more than a year; in September 1940, Ms Feinstein spotted the coincidence that broke the cipher. The breakthrough provided key intelligence for the entire war and those officials privy to the contents called it "Magic".
Once the attack on Pearl Harbour brought America into the war, the country's code-breaking offices were enlarged. As men were shipped overseas as fast as ships could get them there, military leaders - and Congress - realised that the United States could not staff a multi-ocean war using only men, and so women's military groups were created.
Women went to work in air traffic control towers and, despite fears that they would become hysterical in a crisis, kept their wits. In addition to the millions of female factory workers, women ran radios and radar, worked as chemists, bacteriologists and gunnery instructors - and calculated weapon trajectories.
Those who tested high for aptitude were routed into two top-secret code-breaking centres in the Washington area, one for the army and one for the navy.
Other women joined the Office of Strategic Services, forerunner of the Central Intelligence Agency. Vassar maths professor Grace Hopper helped develop the US Navy's Mark I computer. A team of women programmed the army's first large-scale, general-purpose digital computer. (Programming at the time was considered somewhat secretarial, which is why women were employed to do it.)
It's not too much of a stretch to say that inclusion - the willingness to welcome genius - is one reason the right side won the war. The country also benefited from the contributions of other marginalised groups, including Navajo code talkers, Tuskegee airmen and other black troops (including women) serving in a segregated military.
There is a lesson here for the tech bros. Economists have long been mystified by the impulse to discriminate, given that shutting out any group deprives society of advances. Studies show that diverse teams get better results. Inclusion never entails "lowering the bar." It enlarges the pool of talent and brings the best people in.
To be sure, even during the war, inclusion was seen as a temporary emergency measure, and the spectacle of tens of thousands of young women boarding trains to the nation's capital unnerved many. Ads and posters featured plaintive children asking: "Mother, when will you stay home again?"
After the war, backlash set in. The female code-breakers got very little public credit for their achievements, and credit would be a long time coming for towering figures like Ms Hopper. And so here we are: The notion that genius is a male trait has once again raised its head.
In today's rhetorical climate, it's not just a handful of entitled engineers who feel empowered to impugn certain groups. The same animus lies behind the Trump administration's eagerness to exclude refugees and behind the proposed ban on transgender people serving in the military. In gratuitously acting to exclude willing citizens from military service, President Donald Trump has declined to avail himself of the array of ingenuity and courage this nation has to offer.
World War II is a reminder that, when freedom hung in the balance, inclusion kept us safe. It's also a reminder that America's military once took the lead on social change at a time when more families felt connected to military service.
Now, we are greatly divided. We're losing a key military edge and could lose a technical one if we give in to the notion that some groups are more gifted than others. History has shown that exclusion tends to be the approach of, as Mr Trump might put it, the losers.