Since then, the president has appeared on Marc Maron’s podcast, guest-hosted a segment on “The Colbert Report” and driven across the South Lawn of the White House with Jerry Seinfeld in a ’63 Corvette.

Of course, his most frequent target has been himself. He’s made fun of everything from his hair going gray to his approval ratings going down. (This year they’re going up, presenting an added challenge for the writers.) He’s told jokes that set the tone for the year ahead. (2015: “My advisers asked me, ‘Mr. President, do you have a bucket list?’ And I said, ‘Well, I have something that rhymes with bucket list.’ ”) On occasions, he’s used his comedic sensibility to tell some inconvenient political truths. (2013: Republicans agree that “they need to do a better job reaching out to minorities. And look, call me self-centered, but I can think of one minority they could start with.”)

There are some topics no president, even a genuinely funny one, can joke about. National security is off limits. So are all but the gentlest mentions of the first family. Then there was the meeting in 2013 when, sitting on the surprisingly comfortable brown couches in the Oval Office, Mr. Obama’s speechwriters suggested he talk about Republican senators in the style of Alicia Silverstone’s character from “Clueless.” Something like: “So then Mitch was talking with John who was talking with Lindsey who said that Rand and Ted were, like, talking?”

“This might be funny … if a professional comedian did it,” the president said. We moved on.

Another joke he rejected involved the District of Columbia decriminalizing marijuana, a Rand Paul filibuster and a congressional debate on “whether or not the Taco Bell is still open.” He let us pitch him on it, but in the end it proved too clunky and complicated.

On Saturday night, the president will deliver his final correspondents’ dinner monologue. For weeks, writers in and outside the White House have submitted hundreds of jokes, and only a handful of my former colleagues know which 35 or 40 will make the final cut. A safe bet, however, is that at least a few of the president’s one-liners will look back on the last eight years. He’ll have plenty of material to work with — an economic recovery, Obamacare, rescuing the auto industry. It’s unlikely “starring in viral videos” will be high on the legacy list.

But I do think that presidential comedy has played a role in this chapter in American history. The bully pulpit has splintered. It’s become harder than ever to get people’s attention. And the White House has recognized what class clowns have known all along. Being funny helps.