An interview with Google's Marissa Mayerreveals why it is that Google has a slightly higher percentage of female engineers than the rest of Silicon Valley. It's actually a really complicated algorithm.

Mayer estimates in her Newsweek interview that about 20 percent of Google's engineers are women, compared to 15-17 percent in the rest of Silicon Valley. It's not a massive margin (at least by this non-mathematically inclined lady's assessment) but it counts.

I was Google's first woman engineer. And right away during my interview, [Google cofounders] Larry [Page] and Sergey [Brin] said, "You know, we have seven engineers, and they're all guys. But we've thought a lot about how we want to start our company, and we've read a lot of books, and we know that organizations work better when there is gender balance. So it's important to us that we have a strong group of women, especially technical women, in the company."

Okay, so how do you do that when there are so few women in top-level engineering programs?

There was one point in the early days when we had hired 16 men in a row into engineering, and Larry said, "You know what? If we get to 20, I'm not going to sign any more offer letters until you start producing an equal ratio of women."

Wow, I'm not sure I can grasp that math. That Google, always thinking of something!

But seriously, even if it only moves the needle a little, Mayer's interview has some major hints for people who are always throwing up their hands and saying it's not their fault there are no qualified women out there to hire. She says she grew up without internalizing the message that math was un-girly, or that you couldn't be both traditionally feminine and like math and science, a key message that's still a challenge to get across to girls and their parents.

And then she took her talents somewhere that was, by this account, earnestly trying to improve its organization by having women at the table. (She also mentions programs that are meant to support it.) Would you have to be a genius to replicate that?