I was a woman in my late thirties with a newborn, no co-founder and no technical knowledge, starting a company in Silicon Valley. I was also an extrovert. That pretty much went against every cliché, checklist and ideal of the Silicon Valley founder.

My differences are what made me good at my job, particularly my age and the fact that I had a baby. Starting a company is the ultimate act of career creation, and pregnancy is the ultimate act of human creation.

There is a reason founders always refer to their companies as their babies. The skill sets required by motherhood and entrepreneurship are astoundingly similar. Some of the biggest ones are as follows:

Both Are the Toughest Jobs You’ll Ever Love. You will do things for your company and your children that you would never do for a boss or another human being, even for yourself.

You Are in No Way Qualified to Do This. It’s a weird feeling when the hospital allows you to take a tiny, fragile human home after just about a day of “training.” Similarly, many founders have never managed people—or sometimes have never held a proper job before—much less run a company. Silicon Valley values “fresh eyes”; a CEO who hasn’t learned how things have always been done can reinvent things more easily.

Cofounders/Co-Parents are Great… If They Are Actually Great. Ideally, both building a company and raising a family should be things you do with another human being for all kinds of reasons, but only if the match is uncannily right. Otherwise, both lousy cofounders and co-parents can make the job far harder. If you don’t have the right partner, it’s easier to go it alone.

You Become a Time Traveler. Parents and founders can wring maximum productivity out of every moment. But beyond that, time moves in surreal ways when building a company or raising kids. The cliché is “the days are long but the years are short.” Once you get a few years and traumas under your belt, you develop an amazing ability to breathe through situations, knowing they will pass. It’s all a phase. You learn how to create more time or simply grind it out until you hit a new phase.

Everything is Personal in the Best and Worst Ways. You are the leading expert in your children and your company, if you trust yourself to be. You bring your own specific, weird, innate skills to each fight and solve problems like no one else would. Your job as a parent or a CEO is to be whatever your child/company needs most from you at that moment.

You Will Fail Most of the Time. One of the hardest things about entrepreneurship and parenthood is managing your psychology. Perfect is not possible. And that’s the good and the bad news about both.

Knowing failure is expected and normal can be freeing, but it also takes a psychological toll. It’s tempting to look back and say what you could have done better—a risk you shouldn’t have taken, money you shouldn’t have spent on something that didn’t pan out—but each of those things helped make your company and your company’s culture what it is.

It’s the same with parenthood. You will absolutely fail. You may lose your kids at the mall. You may forget to buckle a car seat in an exhausted haze. You may drop them. You may do a million things that make you feel like the worst parent in the world at that moment. Your kids will absolutely complain to someone in the future about something you did that totally fucked them up. You have to take these failures seriously but also shake them off and keep going.

You Get Used to Being the Bad Cop. Part of parenthood is being told how much the thing you love more than anything else in the world hates you and not caving. I’ve hit a point with [my son] Eli where I say, “Your tears only make me stronger, because it tells me you are learning a lesson right now.” You’re the bad cop when you run a startup, too. You’d bleed for your employees, and they respect you enough to believe in your vision. But they also probably do impressions of you behind your back. Your job isn’t to be their friend.

Entrepreneurship and Parenthood are Both the Ultimate Endurance Tests. Because both are so personal, you will go without sleep, without vacations, without luxuries for your kids/companies. It’s the life equivalent to running a marathon. The idea that motherhood makes you weaker is absurd when you step back and think about what motherhood actually demands.

No Matter How Badly it Goes, Your Will Emerge a Better You. In Silicon Valley your résumé levels up a notch as soon as you convince someone—anyone—to give you money for your startup. It doesn’t matter what happens to that startup, just having been a founder is seen as valuable. If my company went under tomorrow, my investors would lose money, but I’d be immeasurably more resilient, experienced, empathetic and valuable as an employee to someone else.

Parenting is much the same. You win simply by surviving. Even a half-assed parent grows as a person. Even the Grinchiest Grinch’s heart grows a few sizes.

You Will Look Back on Both Experiences and Glorify All the Worst Parts of It and Irrationally Want to Do It Again. I remember one of the first times Eli was sick. I was up all night with him for several days on end. He was crying, coughing, burning with fever and hallucinating sharks swimming around his room.

It was a miserable few days. It’s heart wrenching when you can’t take your child’s pain away. Then, finally, the fever breaks, and I feel more bonded to them than ever before. Some of my best memories with my kids are helping them through horrible situations. This is where security and unconditional love are built. This is why they run to me when they are scared or hurt.

It’s the same with startups. Everyone glamorizes those early years of struggle and fear mixed with limitless possibility. But the truth is those early years are horrible. They are only fun in hindsight once you’ve made it.

From the book A UTERUS IS A FEATURE, NOT A BUG: The Working Woman’s Guide to Overthrowing the Patriarchy. Copyright © 2017 by Sarah Lacy. Published by Harper Business, an imprint of HarperCollins Publishers. Reprinted by permission.