For most of the past century, auto and airline companies have been high-profile news makers and terrible investments. When Warren Buffett reflected on his US Airways (NYSE: LCC) investment during the 1990s, he called it one of his biggest mistakes.

There have been 183 bankrupt airlines since 1978, including high-profile companies like Pan Am, Northwest Airlines, and Delta Air Lines (NYSE: DAL). Auto manufacturers have had similar bad luck with General Motors (NYSE: GM), Chrysler, and supplier Delphi Automotive all going through bankruptcy. Even Ford (NYSE: F), which survived the recession without filing for Chapter 11, has been a terrible investment that's underperforming the market over the last 20 years.

By comparison, the unglamorous rail business seems to be a breeze for investors. Canadian National Railway (NYSE: CNI), Union Pacific (NYSE: UNP), and Burlington Northern (now owned by Berkshire Hathaway (NYSE: BRK-A)) have all rewarded investors handsomely.

But airlines and auto company stocks seem to be hot, so has anything really changed?

Big time risks
The airline and auto businesses are similar in that they require huge capital expenditures that will hopefully be paid for by much smaller future sales. In the case of airlines, to pay off a new Boeing (NYSE: BA) 787 Dreamliner that costs around $180 million, an airline must sell millions of tickets to customers. If a glut of airlines hit the market, fuel costs rise, or demand is dented, the financial fallout can be disastrous.

If an auto manufacturer gets a design wrong, it can take a multibillion-dollar bath on the plant upgrades required to make a vehicle.

Those are huge risks for businesses that can obviously bring a business down if they're not handled correctly.

It's all about flexibility
The auto industry has started to learn its lesson, partly because of the success of Toyota's (NYSE: TM) production methods. Instead of building a single car on a line, Toyota built multiple vehicles with millions of options combinations on the same line. The new LEAN manufacturing also allowed the company to do all of this with relatively little inventory.

But competitors were too ingrained in the old ways to follow Toyota's lead right away. Ford had to bring in an outsider, Alan Mulally, to turn things around, and General Motors had to go through bankruptcy to learn the importance of flexibility.

Fellow Fool John Rosevear thinks General Motors has done so well that the stock's a screaming buy right now. But everything is hunky dory because old plants were left behind and union contracts were ripped up during bankruptcy. In another decade, will we be back to the same old mistakes? History says we will.

Southwest (NYSE: LUV), the shining star of the airline industry, has simplified its structure by flying only one type of plane. That cuts back on parts inventory and has allowed mechanics to be specialists on a single design.

Supply is the enemy
The biggest problem for the auto and airline industries is also the strength of railroad companies. Limited supply helps business, something that auto and airline companies have never fully appreciated.

GM thought more brands was better, and it took some dark days to realize that more brands only added cost and complexity to the equation -- not to mention competition against each other. Sometimes less is more.

Yesterday, airline stocks were popping all over the place after Delta and AMR (NYSE: AMR), parent of American Airlines, said they would be reducing capacity next year. Supply is the enemy for airlines as a whole. Adding more planes and flights might increase revenue in the short term when profits are up, but the fall is much harder when demand and ticket prices go down. Such is the conundrum airlines will always face.

Yes, no, maybe so
If you think GM, Ford, Delta, or one of the other airlines or auto companies are making all the right moves, give it another 10 years. Today's exuberance can lead to mistakes for tomorrow, and over the long term, I think these investments will continue to be duds.

Railroad stocks, as boring as they may sound, provide a much better long-term investment than auto companies or airlines. You may not choose trains over planes and automobiles for transportation, but as an investment, they're a much wiser choice.

Interested in reading more about transportation stocks? Add your favorite to My Watchlist, which will find all of our Foolish analysis on this stock.