Elon Musk is a hero to many entrepreneurs, for many reasons--his vision, his audacity, his tenacity. But during Tesla's annual shareholders meeting, he showed another, less common quality: humility. He acknowledged something that few entrepreneurs, let alone Elon Musk, have been willing to admit: "I think I have an issue with time."

Pegged back by a series of delays in Model 3 production and pummeled by critics, Musk admitted that "I kind of say when I think [something] can occur, but then I am typically optimistic about these things. But, maybe, hopefully less optimistic over time. It pretty much always happens but not exactly within the time frame. This is something I'm trying to get better at." Musk's admission strikes home, because it's something all entrepreneurs struggle with: planning how long a project will take. It's perhaps the most challenging part of running a new business.

God knows it's something I've struggled with in my own entrepreneurial efforts. When I was a journalist, deadlines were hard and fast, because there were (and--ahem--still are) actual magazines and newspapers to print and distribute. When I switched to software, a place where vaporware can drag on for years, I was surprised to discover that, despite thorough project documentation and clear task delegation, every schedule dissolved under fuzzy guesstimates and missed deadlines. Projects inevitably take two or three times as long as planned. We could be on schedule for 80 percent of a project only to have the last 20 percent drag on for weeks.

We aren't alone. In software, we all live by the so-called 90/90 rule, which states that the first 90 percent of a project takes 90 percent of the time, and the last 10 percent of a project takes the other 90 percent of the time (which is, you know, impossible). Another law, defined by cognitive science expert Douglas Hofstadter, states that a project always takes longer than expected, even when you factor in Hofstadter's law.

Gina Trapani, one of my heroes of pragmatic software development and a honcho at  Postlight, recently offered some useful perspective. She pointed her finger at miscommunication between what she called "this should be easy" engineers, who bring all their energy and optimism to a project, and the business leaders making the schedule, as well as the inevitable setbacks. "The problem," Trapani notes, "is the optimism."

It's hardly the engineers' fault. Optimism is the beguiling trickster that convinces each of us that a project will be quick and easy, that this team won't run into any unexpected wrinkles, and that this time will be different. Optimism is Musk's two-headed snake: It allows him--and all entrepreneurs--to dream up the impossible, but it makes us wildly underestimate how long it will take to make the impossible real.

So if optimism is our devil, what do we do about it? First, says Trapani, chop up the project into smaller, more reasonable tasks. Less scope means less hope and more realism. Second, understand just how much uncertainty is baked into a project's definition along the way. The more uncertainty, the more delay. Third, always overestimate. Overestimating isn't just doubling or tripling your projection. As Trapani notes, tripling it is just BS'ing it. Instead, here's when to pocket optimism and expect the worst. Build it into the plan. Odds are you'll still be late.

This wisdom is relevant far beyond software. Musk, after all, is wrestling with assembling cars--very big hardware combined with a ton of software, at large scale. Most of us struggle with projects of far less complexity, though no less significant. No matter what industry we're in, we'd all do well to remember there's a difference between when we want something to happen, when it should happen, and when it actually will happen. The sooner we admit this, the faster we'll be able to move on.