Aaron Sorkin is a legend in television thanks to his work on The West Wing, but how do his movies rank? Best known for his signature snappy dialogue and political idealism, Sorkin has had a mixed bag of a career on both the big and small screen.

Amongst his best-remembered works are the stellar screenplays for A Few Good Men and The Social Network, as well as his tenure as showrunner on the political drama The West Wing. However, while these hits were formidable successes, Sorkin’s career has also been plagued by duds such as the flop Studio 60 on the Sunset Strip and the much-mocked self-serious HBO series The Newsroom.

Related: Trial of the Chicago 7's Forrest Gump Character Connection Explained

As Sorkin has only directed two movies (including the recent The Trial of the Chicago 7), this ranking also includes the movies he wrote screenplays for, as the writer’s distinctive voice is much of what makes his movies instantly recognizable. With that in mind, there are 12 movies to rank, with 2 co-written by Sorkin, another 3 uncredited, and the last written (and in 2 cases, directed) by Sorkin.

Charlie Wilson’s War

Tom Hanks in Charlie Wilson's War

Beginning at the bottom, this regrettable 2008 misfire saw Sorkin test the limits of Tom Hanks’ legendary likability by asking the actor to play the real-life Congressman responsible for arming Al Qaeda colleagues the Mujahideen. Charlie Wilson's War is a bizarrely misjudged movie from beginning to end, a goofy comedy in the vein of The Secret of My Success but centered on the arming of a group that would beget the Taliban. Too lighthearted to work as satire but with too dark a real-life story to function as a farce, there’s little to recommend in Charlie Wilson’s War other than a stellar turn from the late, great Philip Seymour Hoffman.

Steve Jobs

Michael Fassbender in Steve Jobs

Where David Fincher’s cool, measured direction helped tone down the more dramatic flourishes of The Social Network’s screenplay, Trainspotting director Danny Boyle proves a bad match for the writer in this uneven biopic. Centered on a rare only-alright performance from Michael Fassbender in the title role, Steve Jobs truly wants to be a dazzling tour de force. But the cluttered direction and overwritten screenplay conspire to make this one less than the sum of its parts.

Molly’s Game

A crime drama anchored by Jessica Chastain’s solid performance in the title role, Molly’s Game is Sorkin’s 2017 directorial debut and the movie proves that as far as directors go, he’s a great writer. There are no big issues with Molly’s Game and it’s a serviceable addition to the crime drama genre, but the movie’s (sort of true) story of an underground poker ring lacks the social commentary of Hustlers or the purely fun escapism of Ocean’s 8 and thus fails to stand out in the currently crowded field of female-led thrillers.

Related: The Trial of the Chicago 7: What Happened To Each Character After The Ending

Enemy of the State

This one is low less because of quality and more because of Sorkin’s limited involvement. The screenwriter only added uncredited rewrites to Rumble Fish screenwriter David Marconi’s original screenplay, a tense and blackly comic spy thriller for the ages. Famous for its prescient predictions about the NSA years before the Snowden leaks, this Will Smith vehicle sees the actor accidentally uncover a conspiracy of global surveillance by the US government. Thanks in part to Sorkin’s added wit, Enemy of the State remains one of director Tony Scott’s many classic action thrillers.

Moneyball

Jonah Hill and Brad Pitt in Oakland in Moneyball

Getting into some steadier territory, Moneyball is the interesting (if unspectacular) story of Brad Pitt’s Billy Beane, an underfunded baseball team manager who enlists Jonah Hill’s dorky data wonk to crunch numbers and lead their team to unlikely victory via an algorithm. Competently lensed by Bennett Miller, the true-life story is engaging but lacks the human drama of his earlier hit Capote and the brutal social commentary of the later Foxcatcher.

Malice

Wild, overstuffed, and all the more fun for it, Malice is a 1993 thriller which proves Sorkin can excel when making campy, self-aware schlock. It’s the neo-noir inflected tale of two newlyweds who live to regret letting a strange surgeon live with them, but the story of Malice ends up being far more twisty and odder than that implies, and this is one Sorkin film viewers should go into blind thanks to the many zany plot twists.

The American President

Michael Douglas and Annette Bening in The American President

Effectively a cinematic dry-run for The West Wing, Rob Reiner’s Sorkin-scripted comedy-drama The American President follows Michael Douglas’ sensible, pragmatic president as he attempts to balance re-election, his love life, and passing a crime bill (a setup which will be instantly familiar to fans of President Bartlett). Fluffy political fan fiction it may be, but there’s an endearing naïveté to Sorkin’s political idealism in this one which is missing in more cynical later efforts such as Charlie Wilson’s War.

Related: The Trial of the Chicago 7: What Happened Next To Bobby Seale

Bulworth

Bulworth - 10 Best Election Movies

Comfortably Sorkin's weirdest movie, Bulworth is the blackly comic story of a frustrated senator played by Warren Beatty who becomes a cult figure when he starts rapping. From its bizarre, cringeworthy rap sequences to its brutally bleak ending, this surreal satire has a lot to recommend and once again proves Sorkin is often at his best when not taking himself too seriously. Also, the movie not only featured an early role for Halle Berry, but its soundtrack also blessed viewers with the unforgettably catchy glam rap hit "Ghetto Supastar", wherein Ol Dirty Bastard accidentally reveals Bulworth’s massive third act twist mid-verse.

The Rock

John Mason gives a thumbs up in The Rock.

Another unexpected entry, this Michael Bay action movie was the recipient of uncredited (but obvious) rewrites by Sorkin. Unusually quick-witted and clever for a silly, high-octane action-thriller, The Rock sees Nicholas Cage pair up with original James Bond Sean Connery (and dumb fun action icon Bay team up with the reliably smart, witty Sorkin) for an Alcatraz break-in in a plot which is as irresistibly fun as it is undeniably far-fetched.

The Trial of the Chicago 7

Trial Chicago 7 Netflix real life

Sorkin's most recent movie, The Trial of the Chicago 7 benefits from a fascinating real-life story as it follows the lives of heroic antiwar activists charged with conspiracy for protesting America’s brutal invasion of Vietnam. It’s full of appropriately incendiary speeches and sees Sorkin at the height of his rhetorical powers, but a small handful of key diversions from reality keep this one from the top spot.

A Few Good Men

Jack Nicholson looks on in A Few Good Men

A dazzling debut, the legal drama A Few Good Men is a rare Sorkin movie with no weak links. Directed by Rob Reiner during his legendary “Stand By Me, When Harry Met Sally, Misery” run, this tense and involving courtroom drama uses Tom Cruise’s charisma and Jack Nicholson’s simmering intensity to great effect and results in an all-time great classic of the genre.

Related: The Trial of the Chicago 7: What Happened To Judge Julius Hoffman

The Social Network

The Winklevoss twins argue about who invented Facebook in The Social Network

The best film of Sorkin’s career so far, 2010’s The Social Network is the epitome of the screenwriter’s appeal. Without lapsing into the infamously treacly idealism that damaged The Trial of the Chicago 7's ending, Sorkin retells the story of Facebook’s creation as a tragic tale of ambition and hubris destroying a friendship for the sake of profit. While the movie may need to mess with reality to make Mark Zuckerberg seem more human, the divergences from truth are understandable in their creation of a tight, compelling drama that manages to make a couple of tech geeks fighting over an idea feel Shakespearean in scope.

More: The Trial of the Chicago 7's Wildest Witness Testimony Isn't In The Movie