If I had it to do over again I would probably not buy a house when I did (in 2002), and would not buy one now. I don’t think that houses – residential real estate in general – will be the investment bonanza that they have been in recent decades.
Productive real estate, such as commercial, residential rental or farmland may be a different story, but we’re not likely to see the appreciations that we’ve seen in the past in family homes. (And that’s probably a good thing, because so much of that “appreciation” was inflation-driven and speculative. I think we’re going to see wild inflation in the not-too-distant future, and there are other debt instruments that would be safer places to conserve and grow capital when that happens.)
I’d prefer to have cash on hand for other investments, and the flexibility to move as conditions and the job market dictate. Having a home is nice, but it’s a very ill-liquid investment if the market sours, the neighborhood deteriorates, the national or state economy weaken, etc.
If you want the house and are determined to stay there “through thick and thin”, and you enjoy the maintenance and improvement projects you can get involved with, then that’s another story. As an investment, I would advise against it.