The cool kids are still learning the ropes in Washington.

Facebook, Google and other Silicon Valley heavyweights are finding that their clout - and cash - doesn't translate as well in the nation's capital.

Last week alone, the valley suffered two major defeats: the House of Representatives passed a watered-down version of a bill that the tech industry hoped would limit the National Security Agency's ability to collect data on users. And the Senate Judiciary Committee failed to advance a bill that would curtail "patent trolls" - firms that survive by suing tech companies for violating intellectual property rights.

And then there's the stalled effort to reform immigration, another issue near and dear to this region.

"Valley companies have gotten a lot more active in D.C. during this administration," said Lee Tien, senior staff attorney with the Electronic Frontier Foundation in San Francisco. "But it has been a slow process. They are still trying to figure out the right relationship with the government."

A little political impotence is a good thing for Silicon Valley. It reminds the tech world that, for all of its self-reverence, the industry is subject to the same system that makes life so complicated for the rest of us.

When it comes to pricing e-books or pledging not to poach each other's employees, Apple and Google have frequently skirted the law. Persuading the NSA to stop breaking into their networks is an entirely different matter.

To be fair, tech companies, especially social media firms, are relatively new to the influence game.

In 2013, Twitter and LinkedIn spent a combined $120,000 on lobbying, according to the Center for Responsive Politics. Facebook and Netflix were more active, doling out $7.6 million on lobbyists, the group said.

But money tells only part of the story. As newcomers to Washington, tech firms need to master the nuances of power politics.

"Washington is a different world than (tech companies) are used to," said Michael Beckerman, president and CEO of The Internet Association, a 2-year-old group whose members include Airbnb, Uber, Salesforce and Yelp. "They think, 'We're trying to do something positive, so everybody should understand us.' But that's not how D.C. works. There are going to be entrenched interests. It takes time. The bar is going to be different for the tech industry because we are used to things moving quickly."

Tech companies also must learn to pool resources, not a natural thing to do considering the egos and fierce rivalries at play.

The tech world, however, is starting to do just that. Recent revelations that the NSA accessed consumer data prompted Apple, Google, Facebook and Microsoft to form the Reform Government Surveillance coalition in a bid to limit the government's authority to collect user information. The coalition even hired Monument Policy Group, a well-connected lobbying firm, to press its case.

"Most tech issues are hard issues," said Jessica Herrera-Flanigan, a strategist at Monument and a former staff director and general counsel for the House Committee on Homeland Security. "Surveillance is particularly difficult, because you need to balance national security and civil rights. Plus you need to understand the technical things the government can and can't do."

So far, progress has been slow. In March, Facebook CEO Mark Zuckerberg, Google chairman Eric Schmidt, Netflix CEO Reed Hastings and other top techies met with President Obama at the White House to discuss privacy. Not much has happened since.

"There's basically no effective communication right now that I'm aware of between the American government, especially the administration, and American tech companies, on like, 'OK, what happens now?' " Bay Area venture capitalist Marc Andreessen recently told the Washington Post.

Ironically, the White House released a report this month about big data and privacy. But rather than focus on its own far-reaching surveillance, the report lectured companies on how they should protect consumer data.

And last week, the House passed a version of the Freedom Act that the tech industry says does not go far enough in checking the government's surveillance powers.

Tech lobbyists say the political process is a long, slow grind. It could take several years to get something done in Washington, they say.

Try telling that to companies that like to fail fast.