The Martian: Andy Weir Explains What He Got Right and Wrong

Software engineer turned sci-fi author talks about his hit book and seeing it adapted to the big screen

4 min read

The Martian: Andy Weir Explains What He Got Right and Wrong
Photo: Chloe Aftel/Contour by Getty Images

graphic link to martian future report

Andy Weir is the author of the 2011 sci-fi novelThe Martian (Crown Publishers), which became a best seller upon its rerelease in 2014. The book follows the exploits of Mark Watney, an astronaut accidentally left for dead on the surface of Mars; this month marks the release of a movie adaptation directed by Ridley Scott. Weir’s shift to author came after a career in software engineering, which turned out to come in handy in crafting The Martian’s plot. IEEE Spectrum Senior Editor Stephen Cass talked to Weir about writing his novel and the technology of space exploration.

Stephen Cass: Tell me about your engineering career.

Andy Weir: I really liked it. I was good at it—I did it for 25 years! When the time came to quit to go full time writing, it was bittersweet: I liked my job, I liked my boss, I liked my coworkers.

S.C.: What was your favorite project?

A.W.: The most famous thing I’ve ever worked on was Warcraft II. And there were a few really fun small projects, because I spent a lot of time working for mobile gaming companies. Mobile games, back in the days before smartphones, were very simple. One engineer per game. I made a Garfield-branded bowling game. That was pretty fun because the AI had to be good at bowling, but not great. But the thing I’m proudest of was mobile device management software for MobileIron, the last company I worked at. When I started on it, the code base was something that had kind of been thrown together and just kept having new stuff glued to it. I gambled my reputation at the company on this gigantic redesign. And it worked! That was probably my shining moment in software engineering.

img from The Martian Twentieth Centrury Fox Movie Mars: Matt Damon plays Mark Watney, an astronaut stranded on the Red Planet, in the Hollywood adaptation of the The Martian.Photo: Twentieth Century Fox

S.C.: The Martian is packed with detailed and plausible aerospace technology. How did a software guy come to write about hardware?

A.W.: I’ve spent a lifetime being a huge space nerd. I’m less about astronomy than stuff like spacecraft: I’ve spent my whole life watching documentaries and [learning] anything I can find out about that.

S.C.: You wrote your own software to model the trajectory of the novel’s Hermes, an ion-drive-propelled spaceship that shuttles astronauts between Earth and Mars. Why go to so much bother?

A.W.: I really wanted scientific accuracy. It was important for me, defining things like how long did it take them to get there, and so on. The math for calculating a constantly accelerating ship was just way beyond me—once I was in my 10th nested integral I went to see how real space agencies did this. As far as I can tell NASA does it through simulation, and I thought, “Well, I can do simulation!”

S.C.: The abilities and limits of space suits are critical to the plot. Did thinking about real suit tech inspire these plot points, or did you have a plot turn in mind and then worked out technology to match?

A.W.: It was based on real space suits. I would always start with the science and work forward to the plot. That’s how, for example, I realized Watney wouldn’t have enough water to grow potatoes [for food], by sitting down and going, “Wait a minute, how much water does it take to grow those? Oh, he doesn’t have near enough.” So that gave me the whole plotline of “How do you create water?” I was actually too pessimistic on space-suit technology. A few months ago I went to Johnson Space Center—it was the best week of my life. They showed a new [space-suit life-support system] that no longer needs filters for carbon dioxide; it can just filter carbon dioxide forever. That’s one of several ways in which technology has been invented, or discoveries have been made, since the publication of The Martian that invalidate things in it. Another is that the Curiosity rover found a ridiculous amount of water stored in the soil of Mars. So all this dangerous stuff that Watney had to do to generate water—he could have just brought dirt in and heated it up!

S.C.: The protagonist has many near-death experiences, yet it never feels like you’re invoking deus ex machinas to keep things rolling. How did you avoid that pitfall?

A.W.: The biggest challenge was making sure that each new problem was plausible. I tried to make each problem come from reasonable stuff, like equipment that was designed to last 31 days wearing out after 400 days. What I really liked was when a problem was caused by his solution to the previous problem.

S.C.: The Martian sometimes reads almost like a series of math word problems. Were you surprised it found such a wide audience?

A.W.: When I was writing it, I was posting it a chapter at a time to my website. I had about 3,000 readers that I accumulated over 10 years of writing dorky stuff. These readers were all heavily science-minded people. So I made sure to show all my work, so that my readers could be like, “Yep, that checks out.” It never occurred to me that anyone who wasn’t a science geek would like it!

S.C.: How do you feel about the movie version?

A.W.: I’m very happy with the adaptation. They definitely care a lot about scientific accuracy.

S.C.: What’s next?

A.W.: I’m working on my next book now. It’s more traditional sci-fi. It’s got aliens and faster-than-light travel, but done my own way. I spent a month coming up with a physics model that allows FTL travel without conflicting with any established physics. [In Einstein's relativity theory, FTL travel implies the ability to travel back in time, but] I don’t want any time travel in my story, so I came up with the mechanics for why it doesn’t work. I try to start with the tiniest kernel of made-up BS that I can and then work everything out from there.

This article originally appeared in print as “The Man Behind The Martian.”

For more from Andy Weir about the technology in the book and the process of seeing it adapted into a movie, watch our interactive interview.

This article is for IEEE members only. Join IEEE to access our full archive.

Join the world’s largest professional organization devoted to engineering and applied sciences and get access to all of Spectrum’s articles, podcasts, and special reports. Learn more →

If you're already an IEEE member, please sign in to continue reading.

Membership includes:

  • Get unlimited access to IEEE Spectrum content
  • Follow your favorite topics to create a personalized feed of IEEE Spectrum content
  • Save Spectrum articles to read later
  • Network with other technology professionals
  • Establish a professional profile
  • Create a group to share and collaborate on projects
  • Discover IEEE events and activities
  • Join and participate in discussions