Entrepreneurs

Before 'The Martian' became a bestseller, its author thought he'd failed as a writer

Share
Source: © 2015 Twentieth Century Fox Film Corporation

If you're looking for motivation to keep your nights-and-weekends side hustle moving forward, Andy Weir's story of rocketing from part-time scribbler to bestselling author is sure to give you a boost.

Weir's first book, "The Martian," is the harrowing tale of a space pioneer who is accidentally left behind on Mars and his attempts at survival. Weir published the science fiction story in 2014 and it became a sensation: It is both a New York Times bestseller and a blockbuster big screen movie starring Matt Damon. The movie received critical acclaim and a hat tip from the space-obsessed tech billionaire Elon Musk.

Mostly accurate and fun movie about Mars. Worth seeing.

Though "The Martian" was a huge success, before the novel debuted, Weir didn't think he could hack it as a writer. He had tried — and failed — for years. In his twenties, Weir took three years off from his career as a software engineer to try to become a writer, he tells Recode.

"I wrote a book, it wasn't 'The Martian,' it didn't get published, I couldn't get an agent, couldn't get any traction. Kind of the standard tale of woe that every writer has," says Weir. "I couldn't break in, so I figured I guess ... I either don't have what it takes or … I don't know, but went back into the software industry."

Elon Musk's plan to colonize Mars has one big problem, according to astronaut Buzz Aldrin
VIDEO1:1301:13
Elon Musk's plan to colonize Mars has one big problem, according to astronaut Buzz Aldrin

Weir didn't mind writing software — he worked as a programmer for two and a half decades writing code for computer games, AOL and mobile startups — but it wasn't his passion, either.

"I live in Silicon Valley, I grew up there, but also it's just like I'm not a technophile. I'm not somebody who like, oh, I've just got to have the latest thing, the latest thing. I liked my job, I liked writing software, but it was never really this thing. It's not like I liked talking about it at lunch, too," says Weir.

He did, however, love writing stories, so he kept at it, despite the early failures.

"This wasn't a sad Charlie Brown music, hang your head situation; I like writing software, but I decided that writing would just be my hobby," Weir tells Ed Lee, Recode's managing editor. Weir jokes that helped that at the time he had "no life," so he could devote time to his endeavor outside of work.

"By the time I was writing 'The Martian,' it never occurred to me that it was publishable, and I really didn't think it would have any mainstream appeal. I thought I was writing for this tiny little niche audience of one percenter nerds like myself who wanted all the numbers correct and the mathematical proofs in the text," says Weir.

The scientific accuracy of "The Martian" is part of its appeal. Weir goes to great lengths to research, with scientific precision, what it would be like to travel to Mars.

"All the facts about Mars are accurate, as well as the physics of space travel the story presents. I even calculated the various orbital paths involved in the story, which required me to write my own software to track constant-thrust trajectories," Weir says in an interview published on his own author website.

Jay Leno drives a version of the $2.5 billion Mars Rover
VIDEO1:0901:09
Jay Leno drives a version of the $2.5 billion Mars Rover

At the beginning, "The Martian" was one of three larger writing projects Weir was working on. He published them to what he admitted was an unsophisticated, bare-bones website. Each time he published a chapter he received "hundreds" of enthusiastic emails.

"I was writing all sorts of stories. I had three different serials going, and random short stories that I would post. I just kind of wrote whatever I wanted, and 'The Martian' was just one of the serials, but it was the one that the readers clearly liked the best, and so that helped encourage me to write it more than the others," Weir tells Recode.

Early in his career, Weir would get emails from readers who wanted to donate money to him for his writing, but he declined. "I'm like, 'I don't need a donate button. I'm a computer programmer, I make a good salary, I'm fine,'" he says.

But otherwise, Weir listened to the feedback he got from his readers.

"My website leaves everything to be desired, and so I was getting emails from people saying like, 'Hey, I loved 'The Martian' but I hate your website. Can you make an e-reader version that I can download and put on my e-reader?' So I did that," says Weir. "And then other people emailed and said like, 'Hey, I'm glad there's an e-reader version, but I don't know how to download a thing from the internet and put it on my e-reader. Can you just post it to Amazon so I can just get it through their system?'"

So Weir did that, too.

"And that's how I ultimately kind of accidentally self-published, and that started ... Basically, you have to charge $1 minimum — well, actually $0.99," says Weir. "And then so it started working its way up the bestsellers in science fiction, and that got the attention of Crown Publishing, and it got me an agent, and a movie deal."

Here's what it will be like to travel to Mars in Elon Musk's spaceship
VIDEO1:2601:26
Here's what it will be like to travel to Mars in Elon Musk's spaceship

It took Weir a long time to get his career off the ground, but once he took off, he soared.

"The movie deal and print publishing deal came within a week of each other, so I was a little shell-shocked. In fact, it was such a sudden launch in to the big leagues that I literally had a difficult time believing it. I actually worried it could all be an elaborate scam," says Weir, in the interview published on his website. "So I guess that was my first reaction: 'Is this really happening?!"

In fact, it was. And though his career took off on the back of a story about flying to space, Weir says he himself wouldn't be likely to last long on Mars. He's also terrified of flying. As to how he flew from his home in Silicon Valley to New York City where he recorded the interview with Recode?

"Valium, lots of it," says Weir. "Yeah, well, and for the record, prescribed by a doctor and not just some guy on the street."

See also:

Silicon Valley insider on achieving success: Don't be intimidated by Jeff Bezos and Elon Musk—instead listen to Steve Jobs' advice

Elon Musk gets personal about his 'terrible lows' and 'unrelenting stress'

How Amazon founder Jeff Bezos went from the son of a teen mom to the world's richest person

Elon Musk reveals the complete SpaceX spacesuit for the first time
VIDEO0:5800:58
Elon Musk reveals the complete SpaceX spacesuit for the first time

Like this story? Like CNBC Make It on Facebook