Ah ok I was under the presumption we were talking about a family here (because the numbers mean something completely different if we are talking about one person -- who doesnt need a large house -- versus a family -- who needs more space and has other expenses)
I assume you want to have a family one day :)
I also imagine you are using a high standard for upper middle class. If you use even top 10%, you are talking professionals earning > $75,000 which most programmers hit at any company (at least in the Bay Area).