He’s the ship’s botanist, which helps, as he feeds himself in part with potatoes he grows and fertilizes with his own shit: the circle of life, compressed all the way down to a single individual. It’s almost two months before NASA notices changes at the landing site via satellite photo—wasn’t the rover on the other side of the habitat in the last picture?—and realizes that Watney is alive. It’s another couple of months before NASA decides to tell his old crewmates, sailing through the void back to Earth, that they left him stranded.

Not that there isn’t plenty for Watney to do during this time. In addition to the potatoes, there are the problems of water (“the good news is that I know the recipe,” Watney tells the recording camera that is the closest thing he has to a companion), of heat (never has a deteriorating plutonium core come in handier), and of finding a way to communicate with Earth. These tasks Watney undertakes with ingenuity and (mostly) good cheer. As he will explain the process later, “You do the math. You solve one problem. And then you solve another. And then another. Solve enough and you stay alive.”

And though Watney may be alone, he’s no longer abandoned. Back on Earth, NASA employees (played by Chiwetel Ejiofor, Jeff Daniels, Kristen Wiig, Sean Bean, Benedict Wong, Mackenzie Davis, and Donald Glover) are scrambling frantically to come up with a feasible rescue plan. So, too, are his former shipmates (Jessica Chastain, Michael Pena, Kate Mara, Sebastian Stan, and Aksel Hennie). Indeed, one of the most refreshing elements of The Martian is that it has no villain, no foil—apart from the inconceivable hardships of Mars, of course. There’s no craven crewmember on the Hermes who’d rather leave Watney behind, no penny-pinching bureaucrat back on Earth who says there’s not enough money for a rescue mission.

There are disagreements—some of them substantial—about the best course of action. But every character in the film is fully committed, often at substantial personal cost, to the goal of getting Watney home safe. (Even one of the United States’s global competitors offers its help.) This unanimity of purpose imbues the film with a rare generosity of spirit. The term “uplifting” might be appropriate here had it not fallen on such hard times.

How good is The Martian? Well, it’s good enough that I didn’t begrudge it the appropriation of Bowie’s “Starman,” which in a lesser film would be an act of criminal coyness. Indeed, despite its intermittent calamities and constant life-or-death tension, The Martian has a degree of humor uncharacteristic of a Scott film, including a running gag about the awfulness of the disco tracks that were left behind with Watney. (“Hot Stuff,” “Rock the Boat,” and “Love Train” all make appearances. Even under the circumstances, however, “Waterloo” remains a bridge too far.) But perhaps the movie’s best joke involves the love for J.R.R. Tolkien that is apparently encoded into the DNA of every living male nerd.