A self-described “lifelong space nerd,” Weir grew up in the Bay Area, where his father worked as a particle physicist. After his parents divorced when he was 8, Weir and his mother, who worked as an electrical engineer, moved frequently, and he entertained himself with computers. He studied computer science at the University of California, San Diego, but ran out of tuition money before completing his degree. Looking for a steady income, he went into programming, and worked at the video game company Blizzard Entertainment and at AOL.
When he got the idea for “The Martian” in 2009, Weir was living alone in Boston, working for a mobile game company. He started to think about what it would take for a person to survive, completely alone, on a hostile planet. (It involved lots of biochemistry, duct tape, swearing and farming with human waste.)
“One of the main reasons that isolation is such a recurring theme in my books is that I spent a lot of my life alone and not wanting to be,” he said. “I was lonely, and so that ends up being a factor in my stories.”
Weir started posting free chapters of “The Martian” on his website. At the request of readers, he uploaded the full text to Amazon, charging 99 cents. Within a few months, he had sold 35,000 copies.
When a literary agent offered to help him get a book deal, Weir was skeptical, but he agreed to send the manuscript to an editor at Crown. Not long after, he sold the book and the movie rights within a single week.
After its release in 2014, “The Martian” sold some five million copies in North America. The movie adaptation, directed by Ridley Scott and starring Matt Damon, grossed more than $630 million worldwide and received seven Academy Award nominations, including one for best picture.
Weir, who is scared of flying, fought his phobia to attend the movie premiere in Toronto, a star-studded event that drew Hollywood celebrities as well as the astronaut Chris Hadfield and Jim Green, NASA’s chief scientist.