Lately, there have been three kinds of comedies, the stupid comedy is the most common, and the very occasional smart comedy pops up every so often, but the most intriguing kind is the smart-stupid comedy. The smart-stupid comedy is a movie that looks stupid and pretends to be stupid, but is actually very smart. Critics and audiences can very easily detect which of these movies is which, and everyone seems to prefer the smart-stupid brand. Examples from recent years include Office Space, Napoleon Dynamite, Harold and Kumar Go to White Castle, Wedding Crashers, The 40 Year-Old Virgin, Clerks II, Borat, Talladega Nights, Blades of Glory, The Simpsons Movie and the new Superbad. Even the Jackass movies -- which I haven't seen -- have their defenders among the intellectual elite.

If you can strike this formula, you're in for box office and critical gold -- and perhaps even an Oscar nomination. Knocked Up (297 screens) has been one of the summer's most enjoyable movies and one its biggest surprises. I almost didn't attend a press screening because it looked like a variation on the dreadful American Pie movies, but the buzz got to me and I went, and I'm glad I did. Judd Apatow's movie isn't much different from the formula of a beautiful girl redeeming a pathetic schlub, but this time it feels as if it came from a genuine place, as if the schlub really felt these things and was expressing his gratitude. For the lowbrows in the audience, Apatow gives his hero a selection of even dorkier roommates with lots of hilarious, shocking things to say and do, but the movie's main drive is pure.

It's not easy to make a smart-stupid movie. Nacho Libre was one notable failed attempt by some of these same filmmakers to re-create lightning in a bottle. Likewise, the members of the so-called "Frat Pack" (Will Ferrell, Ben Stiller, Owen Wilson, Luke Wilson, Vince Vaughn, Jack Black and Steve Carrell) aren't as blessed or lucky as they look; they're responsible for as many bad movies as good ones. For every The 40 Year-Old Virgin, there's at least one godawful Evan Almighty to contend with.

It's much more common to make a stupid comedy, as witness current losers License to Wed (94 screens) and Who's Your Caddy? (63 screens), not to mention Rush Hour 3, Daddy Day Camp and I Now Pronounce You Chuck and Larry. Ironically, some of the current movies that look smart are actually stupid. Frank Oz's Death at a Funeral (260 screens) took great pains to present itself as a sophisticated, British comedy, and a deliberately low-budget indie after some of Oz's giant-sized, mainstream comedies like The Stepford Wives (2004). Death at a Funeral features a talented cast of only somewhat familiar British faces (at least to Americans), but the jokes range from fear of homosexuality to an old man's bowel movements, corpses falling out of coffins and the unintentional ingestion of hallucinogenic drugs. If the movie works at all, it's because British politeness results in smaller, more refined reactions to these ridiculous situations. But many reviews have mistakenly called the movie "dry comedy," when it's very decidedly quite wet.

Another stupid comedy in disguise is My Best Friend (51 screens), from acclaimed French director Patrice Leconte, who announced that he no longer wished to make "serious" films. Here's another big, broad situation: an antique dealer (Daniel Auteuil) has no friends but makes a bet with a co-worker than he can conjure up a best friend by the end of the month. A friendly cab driver (Dany Boon) helps him, but it takes a while before the two realize that they fit like a glove. By that time, the dealer has cooked up a scheme that betrays his new friend's trust. It's the kind of stupid plot that is common in American romantic comedies, but since everything sounds better in French, it has earned modest critical acclaim and box office.

Finally, we have the summer's one anomaly, Nancy Drew (132 screens), which was designed not as a stupid comedy, but rather a movie aimed for young audiences, which sometimes can be the same thing. Usually when studios make films for young audiences, they pander and plead, trying to act cool and dwell in a territory entirely unfamiliar to them. But Nancy Drew actually uses self-reflexive elements to put together a movie that's unexpectedly smart and knowing, and entertaining both to young girls and parents. Most critics didn't get the joke, and probably weren't wired to be reviewing a teenage girls' film anyway, but those that gave it half a chance found something wonderful there.

The key, I think, is that filmmakers have to make a movie for themselves. If the filmmakers laugh at their own jokes, then it's likely that at least a small portion of the audience will laugh with them. But if filmmakers stop and try to figure out what the audience might think is funny -- or worse, try to figure out what a very large audience might think is funny -- then it's no more than research and paperwork. It's not actually humor.