NEW YORK (TheStreet) --Twitter (TWTR) - Get Report, fittingly, lit up the Twitterverse this week when news broke about a recent “frat party” hosted by one of their teams, featuring a flowing keg and beer pong. The optics weren't good, to say the least.

In the loaded context of Silicon Valley, where gender imbalance has been clearly documented and sexual harassment and gender discrimination are sometimes alleged, Twitter’s recent fete seemed to embrace the rowdy, randy culture that many feel has contributed to female tech employees’ alienation.

Having served as the spokesperson for a presidential campaign, I’ve spent plenty of time helping companies overcome media crises. Here are my suggestions for what Twitter (and other tech companies) can learn from its 15 minutes of media hell.

1. Bro culture can’t be the path to advancement. Does it look foolish for Twitter, in the midst of fighting a gender discrimination suit, to host a frat party? Indeed it does, and whichever executive approved it should be reprimanded -- though not fired -- for their utter lack of media savvy.

But in the scheme of things, the party is only a symbol. There’s nothing inherently discriminatory about playing beer pong. Occasionally hosting mindless events where staffers can blow off steam isn’t a big deal.

What would be a much bigger issue, however, is if frat-style parties were the primary or only way for employees to network with each other. Employees should never be socially or professionally penalized if they eschew dumb drinking games; the real action and talent spotting should take place through gender-neutral initiatives like “emerging talent” leadership programs, networking dinners, or other events organized and championed by company leadership.

If the CEO is going to host intimate lunches for rising stars, or personally facilitate a “Lean In Circle,” you’re going to be there – and that helps shape employees’ view of what’s important.

2. Hire feminist leaders. In 2012, Yahoo! (YHOO) certainly changed the discussion around its tired brand by bringing in someone young, vibrant and female, in the form of Marissa Mayer. Twitter, in the midst of its own CEO search, could attempt to do the same.

But far more important than the gender of its next leader is ensuring that whomever is hired is a feminist. An enlightened male CEO who values the contributions of women at his company can do just as much for gender equality as a female leader (and sometimes more, as he can serve as a peer role model for other men who may be less tuned in).

At a minimum, hiring a leader who genuinely appreciates female talent obviates the business risks of picking a loose cannon like Dov Charney, who wreaked havoc on American Apparel (APP) - Get Report with allegations of sexual harassment. And at best, a leader who appreciates diversity will help tech companies harness the full economic advantage that inclusion brings.

3. Empower female employees to become organizers. Why did the Twitter team plan a frat party? I’m 100% sure it was not because they wanted to discriminate against women or create a hostile work environment. They organized it because they thought it would be fun.

The problem is that far fewer women than men find beer and drinking games entertaining. Half the battle is encouraging male leaders and employees to be more sensitive to events and situations that women may find uncomfortable; the other half is encouraging women to step up and organize events they’d find preferable, whether that means dinner gathering or a lecture series or a badminton tournament or a picnic at a nearby park.

Creating your own events is the best way to ensure you’ll find them amenable -- and in the process, you’ll get credit and recognition for being an organizer.

4. Get some women on your board. Hiring more female engineers is easier said than done; in Silicon Valley, I’ll concede that it’s nearly impossible to hireany talented engineer, much less one that meets specific gender or racial diversity criteria. But there is no excuse – other than the tech world’s insular friends-recommending-friends culture – for not having female leaders on your board (which studies have shown is correlated with higher return on equity).

While it’s true that there are fewer female tech leaders, it’s often a smart business move to bring in viewpoints from other industries, as Facebook (FB) - Get Report has done with its one female board member, Susan Desmond-Hellmann, the CEO of the Bill and Melinda Gates Foundation, or Apple (AAPL) - Get Report has done with its two female board members, BlackRock co-founder Susan Wagner and Andrea Jung of Grameen America. (Twitter currently has one female board member.)

And yet the tech industry is the second-worst industry when it comes to female board leadership, with a measly 7.1% of directors (as of last year). It wouldn’t be hard to change that with simple initiatives like Sukinder Singh Cassidy’s theBoardList, which connects tech companies with female board talent.

The culture of Silicon Valley -- the triumph of nerdy boys tinkering in garages -- took decades to create, and it won’t change overnight. But with strategies like these, companies can begin to fight back against the sense that the tech world is an unwelcoming place for women, and the concomitant loss of talent. In the process, it may well discover that tapping the full talents of women enables their companies to become even more effective and profitable.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.