Before Ben Horowitz built one of the fastest growing venture-capital firms in Silicon Valley’s history, he was a CEO on the perpetual brink of disaster. Loudcloud, the early cloud-computing company Horowitz founded with Marc Andreessen after the sale of Netscape to AOL, nearly went bankrupt when the NASDAQ crashed in 2000. When fundraising proved impossible, Horowitz pursued a controversial initial public offering that BusinessWeek called "the IPO from hell."

The business that emerged from Loudcloud’s assets, Opsware, was another journey through hell. When Horowitz finally unloaded Opsware on Hewlett-Packard — for $1.65 billion in cash — he felt more sick than he did relieved. "I couldn’t sleep, I had cold sweats, I threw up, and I cried," he writes in a new book. A few years later, Horowitz decided to do it all over again, starting Andreessen Horowitz with Netscape founder Marc Andreessen.

"I couldn't sleep, I had cold sweats, I threw up, and I cried."

Fortunately for Horowitz, his next startup has had a smoother road to success. In four years, Andreessen Horowitz has raised $2.5 billion and made successful investments in Groupon, Zynga, Instagram, and Skype, which all went public or were acquired for billions. Their current portfolio includes high-profile startups Airbnb, Box, Jawbone, Lyft, and Pinterest, among others. Along the way, Horowitz garnered attention for his blog posts about entrepreneurship, which he has collected and expanded in a new book, The Hard Thing About Hard Things: Building A Business When There Are No Easy Answers. It’s a candid, sometimes melodramatic take on startup life where complete failure is never more than one bad decision away. We sat down with Horowitz in his firm’s Menlo Park offices to talk about the dot-com crash, why profanity produces results, and where he finds the new rap lyrics that serve as epigraphs for his blog posts.

So, in your book, LoudCloud and Opsware come across as businesses that were never more than a few days away from collapse. Was it really all that bad?

"I'm literally the IPO from hell."

Ben Horowitz: Oh yeah. Actually, if you go back and read the stories — sometimes I read them and it seems worse. On the IPO roadshow, BusinessWeek wrote a story: "The IPO from Hell." And I can’t tell you how public-market investors were looking at me when I’m literally the IPO from hell.

At the same time, you also make a full-throated defense of the businesses, which you did take public and eventually sell for more than $1 billion. Have you been itching to set the record straight?

I don’t know about set it straight so much as describe it. Because it started as one of these things where everyone was like, they’re definitely dead. And then when it succeeded, people were like, "Wow, how did that happen?" I got a call from a private equity firm after we sold the company. They said Ben, we’re calling because we want you to join our firm. I was like, why would you want me in private equity? They were like no, no, no: Loudcloud to Opsware was the greatest turnaround in the last 20 years of tech. And I said, well you are aware that I’m the one who fucked it up in the first place?

Do you think you fucked it up?

Yeah, I mean, look — this is the terror of being a founder / CEO. It is all your fault. Every decision, every person you hire, every dumb thing you buy or do — ultimately you’re at the end. A CEO’s supposed to take into account things like macroeconomic environment. At that point I had no idea — it was completely unfathomable to me that NASDAQ would drop 80 percent while I was CEO, or things would go from "money is free!" to "there’s no money at all, fuck you." I didn’t anticipate, and I got us in trouble. And then I wasn’t a very good CEO, to be quite honest with you. I tried hard but I wasn’t good at it. It took me a while to learn the job.

Given the challenges you faced, how much of the final sale price for Opsware do you ascribe to skill, and how much to luck?

"Had a couple things gone the other way, we would have gone bankrupt."

I think there was a lot of both. On the luck side, there’s no question that had a couple things gone the other way, we would have gone bankrupt. On the other hand, it’s hard to imagine a company having worse luck than we had: starting in ’99 in the cloud-computing business. But at the end, Opsware was a really good company. If you talk to the guys who competed with us, they hated seeing us on an account. And that part took a lot of skill.

You once faced an employee revolt over how much you’ve cursed at the office. Are you cursing less these days?

What do you think, Grace?

Grace Ellis, Andreessen Horowitz public relations: No.

Horowitz: Opsware was just a blue streak. You know, I’m a huge believer in clarity. As long as people are clear on what they need to do and what’s going on, you’re very likely to succeed. When nobody is clear, then you’re guaranteed to fail. And profanity helps clarity. Or at least, I haven’t found a better way to get to clarity. If I have one skill as a manager, I can make things extremely clear.

The book uses a lot of war terminology; there are boxing photographs here on the wall. At one point you lament that you can’t award promotions based on executives’ fighting ability. Are you drawn to conflict as a person?

I don’t know that I’m drawn to conflict; you don't necessarily in these businesses want conflict with other companies, though you get it a fair amount. But, and this is one of the best management pieces of advice I ever got from Marc Andreessen: he was quoting Lenin, who was quoting Karl Marx, who said: "sharpen the contradictions." Marx was talking about labor and capital, which is not generally what you’re talking about when you’re running a company. But the conflict is where the truth is. And so when there’s a conflict in the organization, you do not want to smooth it over. You want to sharpen the contradictions, heat up both opinions, and resolve it. Good CEOs are really good at doing that. And it’s miserable to work for someone who tries to smooth things over. "Oh no, it’s a miscommunication." Miscommunication? I don't agree with that, motherfucker!

"I don't agree with that, motherfucker!"

The book has less to say about lessons you’ve learned since starting Andreessen Horowitz. Is that because you’re still learning?

I don’t think I’m in any position to write a book on how to be a venture capitalist. I’m certainly still learning. And I kind of spent my whole life learning how to write The Hard Thing About Hard Things. That was a lifetime’s worth of experience. The main thing was just the way to think about a startup. I definitely have sharper thinking on that than I did the first time, when I’d never done it before.

You like to sprinkle a lot of rap lyrics in your writing. Where do you find new music to listen to?

A combination of things. I’ve got a lot of friends who are pretty deep into music, so I get a lot of stuff from them. There’s a couple of internet hip-hop stations that are good: Underground Hip-Hop and New Hip-Hop First. I listen to the Sirius Radio one, XL Hip Hop, and then Rap Genius has the new stuff that breaks and I get stuff off there. Those are my primary sources. Sometimes Spotify will show me something, but usually I’ve already seen it by the time they figure out I want to see it.

You’re donating all the proceeds from your book to the American Jewish World Service, and its fight for women’s rights globally. Why?

"If you educate a girl, you educate five people."

Well one, the organization itself is super well run. It’s run by Ruth Messinger, who used to be president of Manhattan. She’s just a dynamo. But women’s rights — there are parts of the world where women are not free. They’re not technically slaves, but they don’t have self-determination, they don’t have control over their own lives, they don’t have a right to education. The AWJS has a statistic that says if you educate a girl, you’re very likely to educate five people. And if you educate a boy, you may educate one — but he’s definitely not educating anybody else. You have to have women’s rights so you can have literacy, so you can have education, so you can have democracy, so you can fight terrorism and everything else. So geopolitically, it’s maybe the most important thing. If I wasn’t working, it’s certainly what I would spend on my time on. I think I’m probably more effective providing money — just because I’m good at making money, at this point.