For her book The Creator's Code: The Six Essential Skills of Extraordinary Entrepreneurs (Simon & Schuster, 2015,) author Amy Wilkinson conducted more than 200 interviews with founders such as Elon Musk and Reid Hoffman, to determine how great leaders turn their ideas into companies. Wilkinson recently spoke to Inc. senior editor Maria Aspan about what some successful founders have learned from their missteps. Now, in the following edited excerpt from The Creator's Code, she explains what it means to "fail wisely." 

"Ever tried. Ever failed. No matter. Try again. Fail again. Fail better." --Samuel Beckett

Creators share one trait: failure.

Some fail early. Most fail often. Almost all of them will fail again. But something deeper occurs as a result: Failure provokes learning.

As we hatch new ideas, we discover that much of what we would like to predict is unpredictable. Creators inevitably miss the mark. Difficult conversations, surprising outcomes, and product flaws occur constantly. It's neither fun nor comfortable, but failure is necessary.

"I learned a whole bunch of lessons from the failure at Social­ Net," Reid Hoffman said, referring to his first company, a site that connected people based on common interests. "Given our culture of prototyping, we have had tons of failed prototypes when we are creating products and services," said David Kelley, cofounder of design firm IDEO. "One of the things that's great about Silicon Valley is that failure is a badge of honor because people here value the learning that goes on."

Creators cultivate an ability to be truly--sometimes brutally--honest with themselves about success and failure; at the same time, they maintain a resolve that helps them learn from mistakes. "You have to ask friends to tell you what they see," Elon Musk said. "They don't want to hurt your feelings, but they can see where you're going wrong, often before you can." Creators are transparent about short­comings and acknowledge when they need help. Self-awareness is crucial. They don't hide from failure or hide failure from others.

In fact, creators welcome small failures as a way to push them­selves. "What have you failed at today?" That's the question Sara Blakely's father asked each night at the dinner table. She failed at sports. She failed at singing. She failed to achieve a good score on the LSAT several times, and she had doors slammed in her face when she worked as a fax machine sales rep. But failure didn't stop her when she tried to patent an innovative undergarment. And failure didn't stop her from founding Spanx and becoming America's youngest self-made female billionaire.

Even the world's greatest talents rarely succeed on their first at­tempt. Ernest Hemingway rewrote the ending to A Farewell to Arms thirty-nine times before publishing his manuscript. Alfred Hitchcock shot the shower scene in Psycho seventy-eight times to get the harrowing moment exactly right. Vincent van Gogh described his creative process as "repetitions," painting and repainting versions of a single composition. Ludwig van Beethoven composed symphonies by making hundreds of deletions, corrections, and deep pockmarks in the pages.

Why would creating a company be any less difficult? Why wouldn't it be more difficult? Business creators work on a canvas of market fluctuations. Whereas traditional business leaders often pursue efficiency to minimize risk, creators of new enterprises learn from mistakes about how to proceed.

"When nothing was working, venture capital firm Y Combinator cofounder Paul Graham gave us permission to get out of our comfort zone and go talk to people using our service in New York," Airbnb cofounder Joe Gebbia said. Deciding to get up close and per­sonal with their failures, Gebbia and Brian Chesky booked listings with Airbnb hosts, stayed in their homes, and talked with them over the breakfast table. One simple thing they learned was that would-be renters often posted photos that didn't show their apartments in the best light. So the budding creators rented cameras and shot photos to showcase the available lodgings.

Theranos founder Elizabeth Holmes said, "Our premise starting out was that we might have to fail a thousand times, but we would get it to work. We joked about calling our product 'The Edison,'" referring to Thomas Edison's famous quote, "I have not failed, I've just found 10,000 ways that won't work."

Creators become comfortable with being uncomfortable. To fail wisely, they place small bets, set a failure ratio, believe enough to persist, and turn setbacks into strength.