IBM ended a campaign that urged women to "#HackAHairDryer" after heated online blowback Monday. It's a sign that even when tech companies have the best of intentions, their efforts to tackle the gender imbalance in science and engineering can feel, well, a little sexist.

The campaign actually launched back in October. On a since-removed webpage for it, IBM argued that "hair-raising misperceptions" about how girls don't like science or can't code were keeping "bright minds out of research labs, scrum teams and engineering tracks—leaving untold innovations on the shelf."

That's a sentiment a lot of diversity advocates probably agree with, even if the beauty-product focus of the campaign might have raised eyebrows. But it attracted little scrutiny until this weekend, when a (now deleted) tweet from the company that called on women to join the "#HackAHairDryer experiment to reengineer what matters in #science" hit a nerve.

Hundreds of mocking or outraged tweets followed -- here are a few samples:

A common complaint was the whole thing felt patronizing: Trying to attract women to tech with the lure of hairdryers, even with empowering language, felt a bit like offering pink lab coats to women instead of seriously addressing systemic barriers that discourage women from entering the tech industry. For instance, a 2014 Center for Talent Innovation study found that women in engineering and tech were far more likely to leave the industry than their male peers, at least in part due to factors like "hostile macho cultures," exclusion from the "buddy networks" of their peers and a lack of female role models.

The IBM branding may have felt especially jarring when other recent social media campaigns about changing the face of tech have been more inclusive. Last summer, for example, the #ILookLikeAnEngineer campaign was launched after a female engineer faced criticism for not conforming to stereotypes about what engineers should look like when she was featured in a company ad campaign.

The company tweeted an apology for the "HackAHairDryer" campaign:

IBM is actually one of the few major tech companies with a female CEO, Ginni Rometty. And the company tries to highlight women's historical importance to its business: "At IBM women have been making contributions to the advancement of information technology for almost as long as the company has been in existence," one page about women in tech on its website reads. "Where many companies proudly date their affirmative action programs to the 1970s, IBM has been creating meaningful roles for female employees since the 1930s."

But the company received scrutiny last summer when a woman live-tweeted what she said was a conversation between IBM executives about how they wouldn't hire women overheard while out at lunch.