Sometimes it’s the small stuff that gets you.

When I was a young software engineer over 35 years ago, I had no problem with overt sexual harassment. I knew how to shut that down in a nanosecond.

But how many women in tech fields have the mechanisms to defend against the more-common minor outrages? It still pains me to remember the time my project manager insisted that a male colleague review the code I’d written for a new project – even though the colleague happened to be notoriously incompetent. Or the times customers couldn’t look me in the eye or even speak to me directly, but would instead ask their questions of my male colleagues – even when it was entirely obvious that the one with the relevant expertise was me.

These are the kinds of professional experiences to which almost any young woman in tech can relate to. And coupled with the various social strains – the endless lunchtime conversations about which quarterback offers the best chance for Football Team A to beat Football Team B; the requests by unknowing clients to make the copies or get the coffee; the failure to acknowledge your contribution in a meeting – they add up to a chilly environment overall for women in the fields now known as STEM (Science, Technology, Engineering, Math).

All these years later, I do think things have improved – but only a bit. Most young women entering STEM fields, I believe, still have to experience many of the same petty slights and feelings of alienation that I did.

Here, however, is the silver lining: Having worked in this environment for many years, I’m here to say that for women who come out on the other side, there can be great satisfaction. In fact, now that I’ve matured in my field, I think that in some ways women in STEM may have it better than men.

After all, we do stand out. And if we’re confident enough to be ourselves, we bring a different perspective to our companies – one they really need, and which more and more of them know they need.

So in my view, women don’t have to just ‘tough it out.’ We can help shape our own experiences for the better.

I know that in my own career, I began to feel happier – and perhaps even perform better – when I stopped asking myself, “What can I do to fit in?” and started asking myself instead, “How can I be myself in this environment?”

The reason, I think, is that we can’t “fit in” at many STEM companies. The demographics are weighted too heavily against us and the corporate culture too steeped in male influence. Under these circumstances, even sensitive men tend to make only token efforts to accommodate themselves to women. So efforts to blend in will not only end in frustrating feelings of self-effacement – they’ll be futile.

What will work – over time – is to speak up, without belligerence or defensiveness, and fully participate with all that YOU think, know and understand. If you don’t get football (I don’t), volunteer a great movie you just saw; when the client asks you to make copies or get coffee, respond with “I’d be happy to make that happen,” and pleasantly pass the turn to a male colleague the next time. In meetings when your ideas are not acknowledged, go ahead and recognize your colleagues’ ideas, but add your own perspective.

These kinds of gracious response to slights, I should add, are a lot easier when you recognize that the offensive behavior is almost never about you. Many men don’t spend a lot of time thinking about these matters, and those in STEM may never have needed to make interpersonal skills a priority. When possible, it’s useful to have a little compassion for these colleagues, and to make a good-natured effort even to help them.

In any event, my experience tells me that there are two main steps to succeed with a strategy of not fitting in. The first is to commit to knowing your own mind and speaking it. This involves a difficult balance between trusting your instincts and technical certainty. Throughout my career, I’ve seen plenty of young engineers, disproportionately male, whose excessive trust of their instincts leads them to express themselves – at length – even when the ground they stand on technically is made of Jell-O. But I’ve also seen young engineers, disproportionately female, who will remain mum unless they’re convinced that the ground they stand on technically would withstand an atomic bomb.

Both types are failing to bring the organization their full value. For women to succeed, they need generally to learn to have more faith in their instincts. It takes time and work, but it’s work that is the foundation of strong careers.

The second step is equally important: Have the patience to get to that point of stature. When you do, you’ll find that having matured in your career and gained a reputation for competence, you will no longer feel like a minority in the room. It’s you who will be defining the ‘cultural norm’ of the organization.

Unfortunately, too many young women never reach this point. They leave their tech jobs to have children and are deterred from ever returning by the chilly environment I described at the outset of this piece.

Indeed, 40 percent of women with a degree in one of the tech fields reportedly either never enter their field or drop out within five years. I believe it. I had lots of young women colleagues when I first entered the industry. Most soon vanished.

So what can we do about this 40 percent statistic? One obvious step is to recruit more women. To paraphrase Sheryl Sandberg: “There aren’t more women in tech because there aren’t more women in tech.”

But I know from the experience of my own company that this is easier said than done. Culturally driven preferences can be changed, but it takes time.

So we also have to work very hard to keep the women we get. That entails mentoring. It entails women supporting one another to the best of their ability. And it entails companies’ recognizing that they can actually benefit if they encourage women to be themselves – fully themselves, with their own unique and freely expressed perspectives.

When that happens, the STEM story can have a happy ending for women. It has for me.

Jane Lansing is vice president of marketing at Emerson Process Management in Bloomington, Minn.