One of the last jokes I wrote for President Obama was delivered during the 2016 White House Correspondents' Dinner.

"Eight years ago, I said it was time to change the tone of our politics," the president said. "In hindsight, I clearly should have been more specific."

I'm glad that line made it into the speech; it hits close to home. I moved to Washington in January 2009, when our nation's capital was alive with possibility and hope. I was certain not just that we were going to change America, but that we would build a new and better Washington as well.

The glowing idealism of that moment could never survive contact with the real world. In this town, Congress bears no resemblance to "Schoolhouse Rock." Loyalty to one's party (or one's own career) too frequently trumps the national interest. While I was lucky to play a small part in an administration I really do believe changed America, our efforts to transform Washington — that is, the national-government-and-politics sector — fell short.

It's no wonder that cynicism about "This Town" remains a national pastime. On TV, rivals relentlessly backstab one another in "House of Cards," "Veep" and "Scandal." According to Gallup, nearly two-thirds of parents would disapprove of their child having a political career. In stump speeches, Washington politicians attack "Washington politicians" without irony or shame.

And they're not wrong, exactly. Our broken political system deserves the scorn it receives.

But America's most loathed city is not beyond redemption, and I'm not ashamed to have spent my idealistic 20s here. There's a side to the District that Hollywood doesn't portray, and that the rest of America doesn't always understand. What sets D.C. apart isn't a love of power. It's an appreciation for purpose.

The defining feature of Washington is simple: People move here to be part of something bigger than themselves. After nearly nine years in D.C., I take it for granted that everyone I meet (even the ones I don't like) spends time thinking about big, national questions. They have a vision not just for their careers, but for America.

Here, the dream that entices young people isn't the chance to become a billionaire or a celebrity. It's the chance to be underpaid and overworked in service to the country you love. The origin stories of the transplants who arrive here make Washington a city with a heart.

It's a city with a brain, too. Some politicians value careful analysis; others dismiss and deride it. But no matter the political climate, tens of thousands of men and women continue working behind the scenes in government agencies, think tanks, and nonprofits.

As a speechwriter, I was regularly driven nuts by policy people, with their complicated jargon and nitpicky demands. But it was impossible not to admire them, too. They had devoted their careers to the increasingly radical notion that understanding problems helps you solve them.

Even in the era of alternative facts, Washington is a place where people are proud of knowing stuff. Where else could "wonk" be repurposed as a compliment? Where else could my fiancé, an expert in patent-law policy, find at least one other patent-law policy expert at every party we attend? Where else could a friend and I be (unsuccessfully) propositioned with the line, "Did you know Washington has the highest incidence of threesomes in the United States?"

Long before nerds were cool, it was cool to be a nerd in D.C.

And Washington is a magnet for hard workers. People in San Francisco say startups are exhausting. People in New York say investment banks are demanding. Whatever. Try spending a few weeks working field on a campaign. Take even the lowliest White House job. Plus, D.C. people do the work without any promise of a big payday. I remember one going-away party, for a colleague on the president's economic team, where a mentor delivered a toast.

"For a full year, Jacob turned PowerPoints into memos. Then he turned those exact same memos back into PowerPoints. And because of that, 140 million Americans got a payroll tax cut."

A tax cut for working families was the D.C. equivalent of vesting stock options or opening a bonus check.

But if that combination of selflessness, effort, and intelligence is what makes Washington so special, it's also what makes Washington tragedies so tragic. The great irony of D.C. is that doing well here can erode the very qualities that brought you in the first place. Disappointment can fester into cynicism, enthusiasm into careerism. The same expertise that can be used to help the powerless can be used to rig the system for the powerful instead.

If you've spent more than a few years in Washington, you know someone who's become a real-life character in "Veep." But they didn't start out that way. They started out as real-life extras on "The West Wing."

It must be said that these days — especially but not exclusively for Democrats like me — Washington doesn't feel so West Wing-y. The District has never felt more like the swamp. But there's still hope for the place I now call home. It's a hope found not in the corridors of power, but in group houses and dogged advocacy groups and obscure nonprofits off Capitol Hill.

You find it in eager informational interviewees and in starry-eyed cover letters for entry-level jobs. You find it in coffee shops where geniuses who could be working on get-rich-quick schemes are working to protect democracy instead.

Idealism among grown-ups is a rare quality in our country. I got to work at a White House suffused by it, even during the most difficult hours. The city remains full of that idealism, with plenty of dream jobs still to go around.

So if you're 22, and you believe in the idea that brought me here — that people who love this country can change it — there is still no better place to be. You may feel embarrassed about your ever-growing business-wear collection. You may tell yourself you'll leave any day now, just as I've been telling myself for nine straight years.

But if you wind up staying, that's OK. In fact, it's more than OK. Because the best of Washington is still the best of America. And in its own imperfect way, our nation's capital is still the epicenter of hope

David Litt is the author of "Thanks, Obama: My Hopey, Changey White House Years." He wrote this for the Washington Post.