The housing shortage is a time bomb. As it gets worse it may well become the Vietnam of the '80s.

It will inevitably get worse -- at least for a while. We already are too far behind with the construction and/or rehabilitation of houses and apartments to be able to catch up soon, even if, economically, we knew how to do it.

Meanwhile, more and more Americans are less and less able to afford a decent roof over their heads. With increasing demand (particularly by young people ready to start their own households) and decreasing supply (particularly of moderately priced rental units), the cost of shelter is roughly three times higher than it was 10 years ago.

People tend to get restive if they are forced to live in a slum, or squeezed in with relatives, or in a rented room with an illlegal hot plate, or when they have to pay more than half their income on a place that isn't worth it.

Yet this is no longer only the fate of the poor in the ghettos. This is the life of 17.5 percent of the population of Montgomery County -- the wealthiest county in the United States with an incredible average annual household income of $37,260.

It doesn't take a computer to figure why the housing shortage, even in rich Montgomery County, will get worse. According to County Executive Charles Gilchrist, the county needs 8,000 new homes and apartments a year. Last year, 2,700 were built. This year, there will be fewer. Prices will go up. The number of people who cannot afford market price housing will increase further.

Yet this year, the Housing Opportunities Commission of Montgomery County is able to provide only 225 units of "affordable" housing. It does not expect any federal housing subsidies. There is a waiting list of some 5,500 families. Some have been on it for four or five years. Some 32,500 need subsidies but don't even bother to get on the list.

Most of these people are not poor. They are butchers and bakers, nurses, firefighters, civil servants -- middle-class, middle-income people.

Nationally, the time bomb was charged partly by glaring mistakes in federal housing and urban developemnt programs. In public housing, in particular, the insights of the '70s came too late to make up for the fiascoes of the '60s. Subsidized housing is in such disrepute that the very memtion puts people on the defensive.

Except for hopeless bigots, this is no longer true in Montgomery County. Its housing commission, which emerged six years ago out of the country's public housing authority, is considered one of the most savvy, sensitive and effective such efforts in the country.

Bernard L. Tetreault, the commission's executive director, "is probably the most imaginative housing director around," said Robert W. Maffin, who runs the National Association of Housing and Redevelopment Officials.

Tetrault has managed to make the idea of subsidized housing respectable because he builds respectable housing -- attractive places that boost their occupants' self-respect. "Our business is people, not just buildings," he has said. "And it is never business as usual."

The commission develops, builds, finances, owns, manages and counsels people about what it prefers to call "affordable" (rather than "subsidized") homes, townhouses, high-rises and mid-rises for large families, small households, diabled and elderly persons. It makes the most of the bewildering array of federal programs with names ("Section 8," "Section 236" and such) that mystify ordinary mortals. It also has developed several ingeniuos programs of its own.

Architecturally, the outstanding aspect of the commission's buildings I was shown is that they don't stand out. They are not likely to get a "Progessive Architecture" magazine award for fashionably eccentric, post-modern chic. But neither can any be spotted, like most other subsidized housing, as an institution where the government punishes the poor for their poverty.

"Magruder's Discovery," a cluster of three-story, brick garden apartments for 134 small households, for instance, is a plesant place by any standard. Built under the federal "Section 8" program, it is one of the commission's most recent projects, charmingly sited near Cabin John Regional Park on a meadow Mr. Magruder claimed to have discovered in the 18th century. Designed and landscaped in the best suburban taste, it compares favorably with similar garden apartments in Reston, say.

The difference is that the rent for a one-bedroom apartment in Reston, if you can get one, is at least twice as high. Magruder residents had to sweat out a three- or four-year waiting list and are carefully selected. Their rent is a quarter of their income, which under federal requirements, may not exceed $17,300 a year for a two-person household.

The atmosphere struck me as pleasant and non-institutional as the architecture. The grounds are immaculately kept. There is a nicely equipped community room with a kitchen, a small ball court, and a tot lot. The children have organized their own "Tenant Association Magruder Youth," not only for the acronym TAMY," but also to exchange books, organize excursions, games and arts and crafts activities.

The commission's housing for the elderly -- I visited Waverly House, a 24-story high-rise in downtown Bethesda -- seems to be an equally lively and friendly place to live at any price. You sniff in vain for that institutional smell.The public rooms are cheerful and colorful. The bulletin board announces any number of activities -- but escaping is easy with a Metro stop only a block away.

Among the impressive variety of the commission's recreational and social programs are summer camps and canoeing trips for youngsters, shopping trips for the elderly, counseling services and efforts to establish better rapport between parents and children.I have seen this kind of heart-warming government conern for the community only in Scandanavian housing projects.

Commission housing, to be sure, is not "housing of last resort." Joyce B. Siegel, the commission's community relations officer, makes no bones about that. While the commission promotes racial integration, it does not take care of the indigent. Housing for low income people is scattered throughout the county to avoid the heavy concentrations of the ills of poverty that plague our inner cities.

Among the commission's innovations are the "Moderately Priced Dwelling Unit" program and "Operation Match."

Under a 1974 county law, moderately priced homes or apartments are provided by private developers in return for higher densities than the zoning regulations permit. It applies to developments of more than 50 units, of which 15 percent must be "affordable."

The exterior difference is not conspicuous. The price, design and amenities of these economy models are negotiated between commission officials and the developer concerning such things as extra bathrooms, finished recreation rooms and dishwashers. In one housing cluster I saw, I thought the economy houses actually better looking than the luxury models. They omitted unshuttable luxury shutters.

Montgomery County has 900 such privately built moderately priced homes either occupied or under construction. Fairfax County has a similar program. e

But no other county I know of has thought of the simple idea of Operation Match. It brings people together who are willing to share a house or apartment to reduce housing costs. It has so far worked out for 220 housemates to good advantage, particularly for elderly and disabled people who need someone to look after them.

The commission is authorized to issue tax-exempt bonds with which it makes below-interest mortgage loans to qualified families under a program called "Fund for an Open Society." Its current interest rate is 11 7/8 percent as compared to the market rate of 16 percent.It also buys dilapidated houses, fixes them up and sells them to qualified buyers at affordable prices.

Conservative government or no, before long housing construction will simply have to get into full gear again if we don't want to live like the housing-short comrades in Moscow. This includes federal housing assistance for which we presently spend only one percent of federal expenditures.

When we do get going, Montgomery County's creative flexibility can serve as an example for the whole country.