MDC (NYSE:MDC) reported worse-than-expected first-quarter results thanks to a worse-than-expected housing industry (the inventory of unsold homes was at decade-high levels), and the stock was promptly sold off. However, I think the quarter's results were actually pretty good and that long-term investors should like what they see.

First, the bad news. In the quarter, Motley Fool Hidden Gems recommendation MDC swung to a net loss of $94 million on $745 million in sales, compared to last year's $95 million net profit on $1.1 billion in sales. The loss was because of asset impairment and project write-off pre-tax charges (which are non-cash expenses) of $145 million. Basically, what happens is MDC looks at all of its assets -- its homes under development, land holdings, and options on land lots -- and "marks to market." Because the housing slump has continued to veer downward, cutting into home prices and increasing the incentive costs to sell a home, the value of every homebuilder's assets has decreased on a mark-to-market basis. That's why MDC took those charges.

Now, the good news. MDC continues to strengthen its balance sheet to ensure not only its survival but its flexibility to capitalize on the next housing boom, whenever that may be. MDC has decreased its supply of land lots by 40% over the past year and had only $30 million at risk for optioned lots. Operating cash flow has received a healthy boost thanks to deleveraging and resulted in $150 CFO over the past three months. This boosted available cash to $633 million.

In a cyclical industry, it pays to be two steps ahead of the competition. During the low point of the cycle, it's cheap and easy to acquire competitors and build capacity because everyone else is in a weakened state or scared. MDC has historically been more disciplined than homebuilding peers Pulte (NYSE:PHM), Centex (NYSE:CTX), and Beazer (NYSE:BZH) in terms of debt and inventory ratios. As a result, it has the financial flexibility to zig when others zag. MDC management mentioned that they've told competitors that they're interested in buying land lots if the price is right. So far, the prices aren't quite there yet, but when MDC starts buying, it's pretty safe to assume they'll be getting a bargain.

Related Foolishness:

MDC Holdings is a Hidden Gems recommendation. Try any one of our investing services free for 30 days.

Fool contributor Emil Lee is an analyst and a disciple of value investing. He doesn't own shares in any of the companies mentioned above. Emil appreciates your comments, concerns, and complaints. The Motley Fool has a disclosure policy.