This post originally appeared on LinkedIn.

When you start out as an entrepreneur, it’s just you and your idea, or you and your co-founder’s and your idea. Then you add customers, and they shape and mold you and that idea until you achieve the fabled “product-market fit.” If you are lucky and diligent, you achieve that fit more than once, reinventing yourself with multiple products and multiple customer segments.

Learn faster. Dig deeper. See farther.

But if you are to succeed in building an enduring company, it has to be about far more than that: it has to be about the team and the institution you create together. As a management team, you aren’t just working for the company; you have to work on the company, shaping it, tuning it, setting the rules that it will live by. And it’s way too easy to give that latter work short shrift.

At O’Reilly Media, we’ve built a successful business and have had a big impact on our industry, but looking back at our history, it’s also clear to me how often we’ve failed, and what some of the things are that kept me, my employees, and our company from achieving our full potential. Some of these were failures of vision, some of them were failures of nerve, but most of them were failures in building and cultivating the company culture.

What do I mean by culture? Atul Gawande summed it up perfectly in his recent New Yorker article Slow Ideas. You have a system and a culture when “X is what people do, day in and day out, even when no one is watching. ‘You must’ rewards mere compliance. Getting to ‘X is what we do’ means establishing X as the norm.”

What I got right

I did a good job setting the guiding star for the company. The company goals you’ve heard from me over the years — “Work on stuff that matters,” “Create more value than you capture,” “Change the world by spreading the knowledge of innovators” — really have guided us. Our principles have been the lodestone that have led us into new opportunities and markets.

We were originally a technical writing consulting firm, but our desire to tell the truth about what works and what doesn’t (rather than telling the story as the product manufacturer wanted it told) led us to publish our own books. We wanted those books to be available online, so we began working with ebooks all the way back in 1987 — but influenced by the ideals of the free software movement as exemplified by the MIT X Consortium, we didn’t want those books to be hostage to proprietary software or formats, so we worked on standards for interoperability (what became Docbook XML) and adopted the Viola browser (the first graphical web browser) as a free online book reader.

Working with Viola led us to the web, and we got so excited about it that we went out on a limb to include it at the last minute in the book we published about the Internet in 1992, The Whole Internet User’s Guide and Catalog, even though there were only 200 web sites at the time. (Mike Loukides, the editor of the book, actually wrote the chapter, since there wasn’t time for the author, Ed Krol, to make the publishing deadline.) The book went on to sell a million copies, and the web, well, it went on to become the web.

Our desire to promote the possibilities of the web also led me into a career of advocacy-based marketing, and led us to build the first commercial web site, GNN (which we later sold to AOL).

It was my outrage when no one was paying attention to the free software that powered the Internet that led us to launch our conference business, starting with the Perl Conference in 1997 (which morphed into OSCON, the O’Reilly Open Source Convention), and continuing through the years as a platform for advocacy about technologies that matter. For example, we created our Web 2.0 events as a way to reignite enthusiasm in the tech industry after the dot com bust, and now run events both in “hot” areas like data science (Strata) and web performance and operations (Velocity), but also in important up-and-coming areas like health care (StrataRx) and becoming a better manager (Cultivate).

When Barnes & Noble or Borders returned books to us, stickered and unsalable, we didn’t pulp them; we sent them to Africa, where they could be useful to people who couldn’t afford them. We astounded publishing competitors in the early 90s with our Unix and X Bibliography for bookstores, a marketing piece that included their books as well as our own. We wanted to build the market, and so highlighted the best books, wherever they came from, not just our own. We have followed that same logic in building our digital distribution business today, reselling ebooks from other technology publishers from oreilly.com as long as they agree to go DRM-free.

We started Safari Books Online as a joint venture with our biggest competitor (who once had an internal group named “The O’Reilly Killers”) because we believed publishers needed to find new business models in an electronic future, and we thought that the models we were inventing would be adopted more widely if they included books from multiple publishers. We have worked tirelessly on DRM-free ebooks because we believe that locking books up in proprietary file formats is a path toward a digital dark age.

Our quest to give voice to new movements and communities led us to invest for seven years in Make Magazine and Maker Faire before the rest of the world took notice and came to the party. (Maker Media was spun out as a separate company at the end of last year.)

We published books on life-changing diseases as well as life-changing technologies (Childhood Leukemia, Childhood Cancer Survivors) until the dot com collapse of 2001 led us into drastic retrenchment. We have returned to health care with our StrataRx Conference because we believe that this is a market in need of disruption, and that there is a unique opportunity to apply data both to make the health care system more effective and to improve people’s lives.

We’ve done the same thing with open data in government, advocating the idea that government at its best acts as a platform, working to bring citizens, civil servants and entrepreneurs together to build new ways of solving problems that affect us all. (O’Reilly no longer offers our “Gov 2.0” events, but the work continues even more powerfully via the nonprofit Code for America.)

And through all this, we built a profitable group of enterprises (O’Reilly Media, Safari Books Online, Maker Media, and O’Reilly AlphaTech Ventures) with nearly 500 employees and collective revenues approaching $200 million.

So what’s not to like?

It seems to me that we could have been even more effective (and have been working hard over the past decade to become more effective) by paying attention to some key management skills.

In that spirit, here are some reflections on how we failed as an organization in the past, and what we have been doing to change that.

Failure #1: People hear only half the story

There’s a great moment in a Michael Lewis interview that I heard recently on NPR. (Unfortunately, I don’t have a specific link.) Why, Lewis was asked, would anyone in the financial industry talk to him for his book The Big Short after the devastating picture of Wall Street he’d painted in his first book, Liar’s Poker, nearly 20 years earlier? You have to understand, Lewis replied (more or less), that many of those people got into the financial industry after reading his book. Their big takeaway was how easy it was to make a lot of money without regard to the niceties of creating much value. He finished with the memorable line, “You never know what book you wrote until you know what book people read.”

That turned out to be a major problem for me at O’Reilly. I talked so much about our ideals, our goal to create more value than we capture, to change the world by spreading the knowledge of innovators, that I forgot to make sure everyone understood that we were still a business. Even when I said things like, “Money in a business is like gas in the car. You have to fill the tank, but a road trip is not a tour of gas stations,” people heard the “road trip is not a tour of gas stations” way louder than they heard “you have to fill the tank.”

As a result, we’ve had countless struggles to have employees take the business of the business as seriously as they should. I was always pretty good at finding the sweet spot where idealism and business reality meet, but I didn’t spend enough time teaching that skill to everyone on my team. And I didn’t check in enough about what people were actually hearing when I talked. As Lewis said, “You never know what book you wrote until you know what book people read.”

Reflective listening is an important skill. If I were starting O’Reilly all over again, I’d spend a lot more time making sure the culture I was trying to create was the one that I actually did create. And we’re working hard today not just to get everyone on the same page, but to make sure it’s the same page that we think it is!

Failure #2: “That’s how it’s done”

In the early days of the company, I wrote an employee manual that reflected my own homegrown HR philosophy, based on the idea that I wanted everyone in the company to have the same freedom, initiative, and excitement about our work that I did; it opened with this statement:

“I called this booklet ‘Rules of Thumb’ because every rule in it is meant to be broken at some time or another, whenever there is good reason. We have no absolute policies, just guidelines based on past experience. As we grow, we will learn, and will make new empirical rules about what works best in new situations.”

It also said things like:

“Bring yourself to your work! We haven’t hired you to act as a cog in the company machine, but to exercise your intelligence, your creativity, and your perseverance. Make things happen.”

And:

“Remember, too, that your job isn’t just an opportunity to improve your economic standing, or that of the company, but to make yourself a better person, and this world a little better place to live. Each of your co-workers, our customers, our suppliers, and anyone else you deal with is a person, just like you. Treat them always with the care, fairness, and honesty that you’d like to experience in return.”

The only raises we had were merit raises, as you improved your skills and impact. You were expected to manage your own time, with no set hours, and the only responsibility around vacation time was to make sure that no balls got dropped.

Eventually, I hired an employment lawyer to review my draft, and he said, “That’s the most inspiring employee manual I’ve ever read, but I can’t let you use it.”

I complained, but I eventually gave in. As we grew, it was harder and harder to maintain our informal processes. (I remember a real inflection point at about 50-60 employees, and another at about 100.) We gradually gave up our homegrown way of doing things, and accepted normal HR practices — vacation and sick days, regular reviews, annual salary adjustments — and bit by bit, I let the “HR professionals” take over the job of framing and managing the internal culture. That was a mistake.

I’ve often regretted that I hadn’t kept fighting with the lawyers, working harder to balance all the legal requirements (many of them well-intentioned but designed for a top-down command and control culture) with my vision of how a company really ought to work. I focused my energy on product, marketing, finance, and strategy, and didn’t put enough time in to make sure I was building the organization I wanted.

Reading recently about the HR practices at Valve and Github, so reminiscent of early O’Reilly, I’m struck by the need to redefine how organizations work in the 21st century. I’m not saying that Valve or GitHub’s approach is for everyone, but they indicate a deep engagement with the problem space, and fresh approaches to the questions of how to manage an organization. Google’s People Analytics may be a more scalable application of new HR thinking to a company of serious size.

The point is that while there’s a lot of accumulated wisdom in how to run a company, there’s a lot still to be invented, and you should bring the same entrepreneurial energy to improving the culture as you do to improving the product or your approach to the market.

That, by the way, is one of the reasons I’m excited about our new Cultivate Conference. It focuses on how important it is to build leadership skills, not just tech skills. I’m hopeful that we can bring together leaders (and aspiring leaders) at technology companies to learn from each other, and come away inspired to build organizations that don’t just succeed in the marketplace, but are excellent places to work, have a positive impact on the world, and bring out the best in everyone they touch.

Failure #3: Cash and control

In today’s venture-capital-fueled market of “build it and see if they will come,” it’s often hard to remember that there are businesses built without investors, funded by revenue from real customers. I never took VC money because in my early days as a tech-writing consultant, I saw lots of companies go from being great places to work to being just another company, and I wanted to keep control of what I did and did not do.

I wanted control, but I missed one of the most powerful ways to have it.

Bill Janeway is the author of the outstanding book Doing Capitalism in the Internet Economy. In it, he recounts the lesson of one of his own mentors, Fred Adler, “Happiness is positive cash flow,” and talks about his working principle of “Cash and Control”: “assured access to sufficient cash in time of crisis to buy the time needed to understand the unanticipated, and sufficient control to use the time effectively.”

(I first met Bill in 1995 when Warburg Pincus — and a lot of other venture capitalists — came to look at GNN. Bill won my enduring affection with his honest advice after our lunch: “I don’t think you want our money. You’d come to hate us. You have different goals than we do.” Bill is now a member of O’Reilly’s board — I believe the only time he’s taken a board seat in a company he didn’t fund.)

I came to learn the truth of Bill’s statement about cash and control in the 90s. Publishing is a fairly cash-intensive business. You pay advances to authors — many of whom never come through with the books they promised to write, or take way longer to complete them — and as your editorial, design, and production teams work hand in hand with the author, you may have years of investment before you see a penny back. And in the old days, before ebooks and print-on-demand, you then had to invest tens of thousands of dollars in inventory costs for each book.

O’Reilly was like a leaky bucket. We were always profitable on a P&L basis, but we never had enough cash. And as our publishing business accelerated through the 90s, we needed more and more of it. We borrowed against our receivables and our inventory, juggled payables till our CFO was blue in the face, but we ended up funding our growth through a variety of equity exits from companies we’d spun out and sold, like GNN, or invested in, like Blogger (Pyra Labs), former O’Reilly employee Evan Williams’ first company.

We’d sold GNN to AOL for what seemed at the time the princely sum of $15 million, much of it in stock. We were locked up for a couple of years, but because of our pressing cash needs, we had to sell our stock as soon as it became available, netting $30 or $40 million because of the increase in AOL’s value as the Internet bubble inflated. That was a nice win, but if we’d had the leisure to hold on till the peak, our stock would have been worth $1 billion, and even if we hadn’t timed things perfectly, several hundred million.

Where the shit really hit the fan was after the dot com bust of 2001. We were seriously in debt again, our business was in free fall (shrinking by 30% over the next three years before rebuilding), our banks pulled our loans and nearly put us out of business. (Banks are fond of lending you money when you are doing well, but watch out whenever you’re in trouble! They are the first to the exits.)

I still remember the day I had to decide which employees to cut in our first-ever layoffs. As I pored over the worksheets, I noticed hair all over my papers; I was so stressed that my hair was falling out.

What was sad was that it didn’t need to be that way.

In the depths of the crisis, we hired a new CFO (Laura Baldwin, now president and COO), who instituted new financial controls and discipline. She renegotiated contracts with suppliers. She ruthlessly cut non-performing titles, freeing up the cash from inventory. And she was the one who persuaded me to do the layoffs rather than going down with the ship and all hands.

The difference was enormous. We rebuilt O’Reilly’s revenues and profits through successful new books and conferences, the growth of Safari Books Online (which we’d launched right in the middle of the crisis), Maker Media, and other new businesses. But the biggest impact may well have been the one that Laura had — on our cash.

Let me put it this way: during the 90s, our average revenue per title from publishing was more than $250,000. After the bust, it slipped to less than $100,000 and never recovered. Yet during the 90s, we were always bleeding cash, while since the bust, we have put tens of millions of dollars in the bank through positive cash flow. That has given us money to invest in new ventures and business transformation as the world continues to change around us.

There are four lessons here:

Financial discipline matters. It really matters. If you’re a venture-backed startup, financial discipline gives you more control over when you have to go out for that next round. If you’re self-funded, financial discipline lets you invest in what’s important in your business. So many companies agonize over the quality of their product, and work tirelessly to build their brand, yet pay the barest attention to their financials. Money is the lifeblood of your business. Take it seriously. You have to get good at managing it. Treat your financial team as co-founders. They aren’t just bean counters. They can make the difference between success and failure. Don’t just look for rockstar developers or designers, look for a rockstar CFO. Hire someone who is better than you are, who can be a real partner in growing the business. Before Laura came on board, I was always the most numerate person in the organization, the one with the most sensitive finger on the pulse of our financials. (I would often tell our previous CFO, “Those numbers look wrong — check them!” I had so internalized the ratios and average monthly spending by category that I knew immediately when something was out of line.) Even if you’re a good entrepreneur with a nose for where money intersects your vision, a first-class financial team focused on building effective controls, managing expenses, and optimizing the system will be well worth it. Hold teams accountable for their numbers. Every manager — in fact, every employee — needs to understand the financial side of the business. One of my big mistakes was to let people build products, or do marketing, without forcing them to understand the financial impact of their decisions. This is flying blind — like turning them loose in an automobile without a speedometer or a fuel gauge. Anyone running a group with major financial impact should have their P&L tattooed on their brain, able to answer questions on demand, or within a few moments. It isn’t someone else’s job to pay attention. Financial literacy doesn’t come naturally to everyone. Make sure it’s part of your employee training package, and make sure that people running important business functions are held accountable for their numbers. Run lean; reinvent tirelessly. After the bust, we laid off 20% of our staff, and while we missed many of them intensely on a personal level, as a business, we didn’t skip a beat. So many people were doing things that just didn’t need doing! Maybe those things had once been necessary but had outlived their usefulness, but many of them were just cruft that had accumulated in the organization. The Lean Startup methodology emphasizes measurement in quest of product-market fit, describing a startup as “a machine for learning.” This is great. But you need to turn these measurements not just outward on the market but inward on your organization. What is the impact of each activity? Who could be repurposed toward something with greater impact? Does this job really need doing? Can it be done more efficiently and effectively? (For more on this topic, see my previous post, Linking Mission to Strategy and Action.)

Failure #4: Tolerating mediocrity

There was another lesson that we learned from those 2001 layoffs. While most of the people we laid off were great employees who went on to find good jobs elsewhere, we were appalled to discover there were some people who had built themselves a nice, cozy position but weren’t working very hard. While most of us were pulling the wagon, they were simply riding on it. We even discovered several cases of fraud! That goes back to my point above about the importance of a crack financial team — one of their key jobs is to have strong controls in place. I would never have believed that one of my employees would do that. It can happen to any company. The longer you are in business, the more outrageous things you will have employees do on your watch!

Looking back, I had an extremely naive view: everyone was inspired by the same motivations as I was, passionate about their work and the impact that we were having. They loved their jobs and wanted to be great at them.

If you want that to be true, you can’t just believe it; you have to work at it! You need a real emphasis on hiring, training and mentorship — and firing! Every manager in the company has to be an expert on his or her staff — what makes them tick — and as focused on finding “employee-company fit” as the product and marketing team are in finding product-market fit. And HR can’t just be the complaint department. It needs to be an active partner in talent acquisition, culture, and leadership development.

When someone isn’t right for the job, it’s easy to shrink from the confrontation of telling them so, or to accept 60% or 70% of what you wanted because you think you can’t afford the time and trouble to find a replacement. You aren’t doing anyone any favors. An employee who is not performing at 100% is as aware as you are of that fact, and most likely isn’t happy about it. Having the courage to ask them to move on is an essential management skill. (It doesn’t even have to be firing; it can be coaching them to make the decision on their own.)

Looking back, I wish we’d worked harder early on to build an organization in which human potential isn’t just expected and taken for granted, but is also nurtured — if necessary, with tough love. So many times I knew that someone was doing less than we had a right to expect, but I’d let their manager protect them. I didn’t have the guts to keep working the issue till we understood what to do and took appropriate action. We ended up building a culture where managers too often compensated for the failings of employees by working around them, either working harder themselves, hiring someone else to fill in the gaps, or just letting the organization be less effective. We’re doing much better today, but we still have a long way to go.

So, if you have a bad feeling about the role someone is playing in your organization, work the issue until you feel right about it. Take management seriously!

The same lesson applies on the product and marketing side. I never regretted raising the bar — sending a book back for more work at the last minute, even though the author and editor thought it was done (in the early days, I used to read every O’Reilly book), deciding that the hotel the team had selected for the first Perl Conference was too cheap and didn’t set the right tone, and we had to move to another one — but I look back at the many times I let something go by that I shouldn’t have because the team would be upset, and I regret every one of them. You can be uncompromising without being a jerk. I sometimes wish I’d channeled my inner Steve Jobs a little more often.

Those moments of giving in to convenience — the schedule is already in place, it’s too late to make a change, we’ve already announced the product (or worse, released it!), the ad is already running — gradually wear away at a company’s greatness.

At the same time, you can’t have random drive-by corrections by management. There needs to be a culture that aspires to greatness, but also understands that that is the result of a disciplined process of setting and achieving expectations, not just waiting for inspiration to strike.

Failure #5: Hiring supplements, not complements

Another of the things I wish I’d done earlier was to hire people who were good at things I wasn’t. As a founder, you often seem to be the best at everything — the best product designer, the best marketer, the best sales person. Sometimes that’s really true, but often it’s just because you hire people who aren’t as good as you are at the things you’re good at, and don’t hire people who are better than you are at the things you don’t do so well. You hire supplements to do more of what you already do, rather than people who really complement your skills.

I already mentioned how I went through the first 20 years of my company’s life without hiring someone who was better on the financial side than I was. We didn’t build a sales and marketing culture either — it was foreign to our idea of who we were. We were product driven, idea driven, and while we developed a unique and powerful style of activism-driven marketing, we never developed the kind of analytical marketing discipline that someone like Alistair Croll describes so well in his book Lean Analytics. And as for sales, that felt a little dirty to many of our employees.

In the past few years, we’ve worked hard to change that. Laura has led a successful effort to develop that analytical marketing competency and to add sales thinking to the company DNA. We now have sales training for anyone who has customer contact. We’ve built a team to focus on sponsorship sales for our events, more than doubling our yield and vastly improving the profitability of our events.

Failure #6: I’ll take care of that

I believe it was Harold Geneen who once said, “The skill of management is to achieve your objectives through the efforts of others.” Yet, like so many entrepreneurs, my first instinct was not to hire the team to go after a new product or market, but to do it myself, or with the team I already had.

Some of that was a byproduct of being a scrappy, self-funded organization, where the existing team tries new things and hires only after it’s clear there’s really an opportunity there. It’s great when your management team leads from the front. But overall, we took it too far and didn’t build a strong enough culture of deliberate hiring to go after new opportunities.

O’Reilly always grew organically. That has a real charm, and accounts for many of the things people love about the company. But a company needs business discipline, identifying strategic goals, then investing and hiring to achieve those goals, just as much as it needs product, marketing, sales, financial, and employee cultivation discipline. While our ideals are what define us, combining those ideals with a results-oriented business culture is how we have continued to thrive.

Anthropologist Claude Levi-Strauss wrote in his book The Savage Mind about the difference between the bricoleur (handyman) and the engineer. The handyman makes do with what he has to hand. The engineer thinks more abstractly, figures out what he or she needs, and acquires it before beginning work. I was always a bricoleur. As we go forward, I aspire to be more of an engineer. Although it’s good to remember that, as Marc Hedlund, former SVP of product development & engineering at Etsy, remarked, “People and code are…different. The approaches that work so well for getting new software to run are not directly applicable to getting people to work well together.”

For more about my failures, and lessons I’ve drawn from them, come to my talk at Cultivate: How I Failed. The conference as a whole is about how to build and sustain great companies by building a great culture.