"It's an honor to share this stage with the president," O’Brien said at the start of his set. "When you think about it the president and I are a lot alike. We both went to Harvard. We both have two children and we both told Joe Biden we didn't have extra tickets for tonight's event."

O’Brien had plenty of zingers for the media. Among them:

“The print media are here for two very good reasons: food and shelter…. The print media still has a big star in Bob Woodward. Earlier the waiter asked if he wanted regular or decaf. And he said, ‘Stop threatening me’…. TIME will outlive Newsweek the way Juliet outlived Romeo…. MSNBC’s Chris Matthews is here. He has the only show where commercials exist just so they can wipe the spittle off the lens.”

And here’s some of what political junkies said were President Obama’s best jokes:

“The media landscape is changing so rapidly you can't keep up with it. I mean I remember when 'buzzfeed' was just something I did in college around 2 a.m."

"Did you know that Sheldon Adelson spent $100 million of his own money on negative ads [in the 2012 presidential campaign]? You've got to really dislike me to spend that kind of money. Sheldon would have been better off offering me $100 million to drop out of the race. I probably wouldn't have taken it, but I would have thought about it. Michelle would have taken it. You think I'm joking."

"One thing [Republicans] all agree on is they need to do a better job reaching out to minorities. Call it self-centered, but I could think of one minority they could start with. Think of me as a trial run. See how it goes."

Scheduled barely two weeks after the Boston Marathon bombing, the dinner had its serious moments too.

Obama said this about press coverage of that tragic event:

“If anyone wonders … whether newspapers are a thing of the past, all you needed to do was to pick up or log on to papers like the Boston Globe,” he said. “When their communities and the wider world needed them most, they were there making sense of events that might at first blush seem beyond our comprehension. And that’s what great journalism is, and that’s what great journalists do.”