Andy Weir’s Unlikely Second Act: How a Self-Published Programmer Became Hollywood’s Favorite Hard-Science Storyteller

Andy Weir discusses his unconventional writing process, the Ryan Gosling-led adaptation of Project Hail Mary, and why he thinks most writing advice is wrong — revealing how an engineer's mindset built two of modern science fiction's biggest commercial successes.
Andy Weir’s Unlikely Second Act: How a Self-Published Programmer Became Hollywood’s Favorite Hard-Science Storyteller
Written by Victoria Mossi

Andy Weir doesn’t outline his novels. He doesn’t know how his stories end when he starts writing them. And he’s perfectly fine with that.

The author of The Martian and Project Hail Mary — two of the most commercially successful hard-science fiction novels of the past decade — recently sat down with The Verge to discuss his creative process, the adaptation of Project Hail Mary into a major motion picture starring Ryan Gosling, and why he thinks most writing advice is nonsense. What emerged was a portrait of a writer who has built a massive following not by following the rules of literary fiction, but by systematically ignoring them.

“I don’t plan ahead,” Weir told The Verge. “I just write the next scene. I figure out what happens next, and I write it.” This approach — which would horrify most creative writing professors — has produced two global bestsellers and spawned two major film adaptations. The first, Ridley Scott’s 2015 film The Martian, grossed over $630 million worldwide and earned seven Academy Award nominations. The second, directed by Phil Lord and Christopher Miller, is set for release later this year.

Weir’s path to literary stardom is one of the most unusual in modern publishing. A software engineer by training, he originally serialized The Martian chapter by chapter on his personal website. Readers who followed along would email him corrections on his orbital mechanics and chemistry. He incorporated their feedback. When he eventually self-published the novel on Amazon for 99 cents — the minimum price the platform allowed — it rocketed to the top of the science fiction bestseller list. Crown Publishing acquired it shortly after. The rest is well-documented history.

But what’s less discussed is how Weir’s engineering background fundamentally shapes his storytelling method. In his conversation with The Verge, he described a process that reads more like iterative software development than traditional novel writing. He builds scenes the way a programmer builds functions: one discrete unit at a time, testing each against the logic of what came before, discarding what doesn’t work. He estimates he throws away roughly 30 percent of what he writes.

That willingness to delete is, by Weir’s own account, the closest thing he has to a creative secret. “If it’s not working, throw it away,” he said. Not revise. Not rework. Throw it away. Start the scene over from scratch. He described this as the hardest lesson for aspiring writers to internalize, because it means accepting that hours or days of work can simply vanish. But the alternative — trying to salvage mediocre prose — produces mediocre books.

Project Hail Mary, published in 2021, tells the story of Ryland Grace, a middle school science teacher who wakes up alone on a spaceship with no memory of how he got there. Earth is facing an extinction-level threat from an alien microorganism called Astrophage that is dimming the sun. Grace, it turns out, is humanity’s last hope — though he doesn’t remember volunteering for the job. The novel sold millions of copies and spent weeks on the New York Times bestseller list.

The film adaptation has been one of Hollywood’s most closely watched projects. Ryan Gosling stars as Grace, and Lord and Miller — the duo behind Spider-Man: Into the Spider-Verse and The Lego Movie — are directing. The production reportedly carries a budget north of $200 million, reflecting Amazon MGM Studios’ confidence in the property. Gosling has spoken publicly about his enthusiasm for the role, calling the book one of the best he’s ever read.

What makes the adaptation particularly challenging is the novel’s central relationship. Grace’s only companion for much of the story is an alien named Rocky, a spider-like creature from a different star system who communicates through musical tones. The friendship between Grace and Rocky — two beings who share no common language, biology, or frame of reference — is the emotional core of the book. Translating that to screen without it feeling absurd requires exactly the kind of inventive filmmaking Lord and Miller are known for.

Weir told The Verge he’s seen portions of the film and is pleased with the results, though he was careful to note that he doesn’t have creative control over the adaptation. He’s learned to let go. “It’s their movie,” he said, echoing a pragmatism that seems consistent with his engineering mindset. The book is the book. The movie is the movie. They’re different products built from the same raw materials.

This attitude stands in stark contrast to the protectiveness many authors feel toward their work. But Weir has reason to trust the process. His experience with The Martian film was overwhelmingly positive. Drew Goddard’s screenplay made significant changes to the source material — compressing timelines, cutting subplots, altering the ending — and the result was a tighter, more cinematic story that still felt faithful to the novel’s spirit. Weir has said publicly that he considers the film better than his book in several respects.

His candor on this point is refreshing. Many authors, even those who profess satisfaction with their adaptations, can’t resist cataloging the differences between page and screen. Weir genuinely doesn’t seem to care, as long as the final product is good.

The Verge interview also touched on Weir’s writing advice, or more accurately, his skepticism of writing advice as a category. He pushed back on the common prescription to “write what you know,” arguing that imagination exists precisely to let writers explore what they don’t know. He also dismissed the idea that writers need to establish daily

This problem-solving orientation is what distinguishes Weir’s fiction from most contemporary science fiction. His protagonists don’t triumph through heroism or moral clarity. They triumph through math. Mark Watney survives on Mars by calculating caloric intake and potato yields. Ryland Grace saves Earth by running biochemistry experiments. The drama comes not from whether the characters will make the right moral choice, but from whether they can figure out the right equation.

It’s a narrow formula. Weir knows it. He’s spoken openly about his limitations as a writer — his dialogue can be clunky, his characters sometimes blur together, his female characters in particular have drawn criticism for feeling underdeveloped. His second novel, Artemis, published in 2017, was widely seen as a disappointment. Set in a lunar colony, it featured a female protagonist named Jazz Bashara whose voice many readers and critics found unconvincing. The New York Times called it “contrived.” Sales were solid but fell well short of The Martian‘s extraordinary numbers.

Project Hail Mary was the comeback. And the key to that comeback, arguably, was Rocky. By making the central relationship one between a human and a genuinely alien being, Weir sidestepped his weaknesses and played directly to his strengths. He didn’t need to write convincing human dialogue for two characters — he needed to invent a plausible alien communication system and then dramatize the process of two scientists learning to talk to each other. That’s an engineering problem. Weir is very good at engineering problems.

The book’s commercial success has cemented Weir’s position as one of the most bankable names in science fiction. His next novel is reportedly in progress, though he’s shared few details. What he has said, in various interviews including the one with The Verge, is that it will follow the same hard-science approach that defines his work. No faster-than-light travel. No magic technology. Every plot device grounded in real or plausible physics.

This commitment to scientific accuracy has earned Weir a devoted readership among engineers, scientists, and space enthusiasts — audiences that Hollywood has historically struggled to reach. NASA has embraced his work. Astronauts have read The Martian aboard the International Space Station. When SpaceX launched its Crew Dragon capsule, copies of the novel were reportedly on board.

The Project Hail Mary film arrives at an interesting moment for science fiction cinema. Denis Villeneuve’s Dune films have demonstrated that serious, idea-driven science fiction can perform at the box office. Christopher Nolan’s Interstellar and Oppenheimer have shown audiences will sit through dense scientific exposition if the story earns it. And streaming platforms have invested heavily in science fiction properties, raising the baseline audience awareness for the genre.

But Weir’s brand of science fiction occupies a specific niche. It’s optimistic. Aggressively so. His protagonists face existential threats and respond with competence, humor, and an almost pathological refusal to give up. There are no dystopian undertones, no critiques of capitalism or technology, no brooding antiheroes. Just smart people solving hard problems. In a cultural moment saturated with apocalyptic anxiety, that optimism has proven surprisingly commercial.

Whether the Project Hail Mary film can replicate The Martian‘s box office performance remains an open question. The source material is stronger, most readers agree. But the production challenges are greater — Rocky alone represents a massive visual effects undertaking — and the theatrical market has shifted considerably since 2015. Audiences are choosier about what gets them into theaters. A $200 million science fiction film needs to open big.

Amazon MGM Studios is betting it will. The marketing campaign is expected to lean heavily on Gosling’s star power and the Lord-Miller brand, while also targeting the book’s enormous built-in audience. Early tracking suggests strong awareness among the 18-to-34 demographic, according to industry sources.

For Weir, the stakes are somewhat abstract. He’s already wealthy. He’s already proven he can write a bestseller, lose his footing, and write another one. The film’s success or failure won’t change his process. He’ll sit down, figure out what happens next, and write it. If it doesn’t work, he’ll throw it away and start over.

That’s not conventional writing advice. But nothing about Andy Weir’s career has been conventional. A self-taught programmer who posted a novel online for free, watched it become a global phenomenon, stumbled with his follow-up, and then delivered a book that might be better than his first — all while insisting he has no idea what he’s doing. The evidence suggests otherwise.

Subscribe for Updates

MediaTransformationUpdate Newsletter

News and insights with a focus on media transformation.

By signing up for our newsletter you agree to receive content related to ientry.com / webpronews.com and our affiliate partners. For additional information refer to our terms of service.

Notice an error?

Help us improve our content by reporting any issues you find.

Get the WebProNews newsletter delivered to your inbox

Get the free daily newsletter read by decision makers

Subscribe
Advertise with Us

Ready to get started?

Get our media kit

Advertise with Us