Editor’s note: Vivek Wadhwa, a former tech entrepreneur in the Triangle turned academic and author, is a frequent contributor to WRALTechWire.

SAN FRANCISCO – Listen to the tales of successful company founders and you will get the impression that they sailed smoothly to success. They’ll lead you to believe that they did everything right and made it big because of their smarts and perhaps a little luck.

Don’t be fooled. Entrepreneurship is never like that. You fail constantly, suffer setbacks at every turn, and live with the fear that you won’t be able to make payroll or that your product won’t work. You have to deal with disgruntled employees, unhappy customers and concerned investors. Even when you achieve success, you wake up the next morning and find that everything is falling apart—that even before you’ve gotten over the hangover you have another big headache.

The truth is that entrepreneurship is more like a roller coaster ride than a cruise.

You will find that every successful entrepreneur has suffered many setbacks. These entrepreneurs just forget to mention these when they are doing interviews with the Wall Street Journal or Bloomberg TV.

That is why founders need to maintain humility, sleep with one eye open and be ready for disaster. Always raise more money than you think you need, be prepared for the sales or downloads of your product to be miniscule, and for your business partners to desert you.

The most valuable lesson I learned in dealing with the ups and downs was to invest in my employees—to do all I could for them when the times were good. I would try my best to help them with their career progression, to pay them fairly and reward extraordinary contributions, and to let them be there for their families. In return, they rewarded me by sticking with me through all the downs and making sacrifices when it was needed.

At one stage, I miscalculated how my company, Relativity Technologies was doing. We were on top of the world—growing at triple digit rates, getting accolades from the press and great reviews from our customers. Then the dot-com bubble burst and slowed down sales for the entire tech industry. I didn’t see the warning signs. I thought since we were a growing enterprise software company, we would not be affected. My mistake nearly cost me the company. Before I knew it, sales stopped closing and we were running low on cash. I had to make some tough decisions and reduce costs.

I was touched when my entire management team offered to take a 50% salary cut until things got better; the rank and file agreed to take 20% cuts and work four days a week; and employees I could not keep on board because we had changed strategy showed up for work anyway—because they said they may as well work until they found new jobs. Needless to say, that with such dedication and employee support, my company survived through the slump and I was again on top of the world.

You need to build this reserve of goodwill and support. No matter how well things are going, failure and disaster are just around the corner. So celebrate the good, but be ready for the bad.

PS. After I turned Relativity Technologies around, out of the blue came another setback, more battles, more successes, and more failures. The roller coaster was even bigger. But that is a different story.

You can follow me on Twitter and read more of my articles on my website: www.wadhwa.com

(C) Vivek Wadhwa