Somalia is a nation busy turning rags into riches. Everywhere one travel, there seems to be a "crash program" under way mobilizing the sleeping energies of the nearly 4 million Somalis for the country's belated and badly needed development.

Through these much-touted crash programs and also local "self-help" projects, Somalis have had to go at building everything from macadam streets and boulevards in the capital to a museum and national theater in Hargesa in northern Somalia.

American and U.N. economists said it would cost millions of dollars tostop the sand dunes from encroaching on the coast's fertile lands south of the capital. Instead, the Somali government decided to mobilize tens of thousands of people - youths, women and civil servants - to halt the forward march of the dunes by hauling soil and then planting trees and bushes all by hand.

The same "bootstrap spirit" prevailed here two years ago when the government moved en masse more than 100,000 nomads stricken by three years of drought 1,000 miles from the north to the south of the country and boldly made farmers and fishermen of them.

Somalia give hope that the world's poorest nations can develop if their governments commit their energies and human resources to it.

Recently, the Somali government, in an apparent attempt to improve its image in the West and Arab world, conducted a group of about 20 Western and Arab journalists on a guided tour of the "new Somalia," taking them everywhere from Kismayu in the south to Hargesa in the north. In the space of a few days, we were shown more of Somalia than most resident diplomats, who are severely restricted in their travels, see in two years or more of living here.

Many African countries, particularly the socialist ones, talk endlessly about "self-reliance" and the need for "mobilization of the masses." But few have done as well as Somalia in taking these slogans to heart and trying to substain a populist approach toward development.

Every afternoon including Friday, the Moslem holy day Somalis turn out in large numbers across the nation to work on local and national "self-help" schemes. In this manner, hundreds of schools, clinics, and public buildings have been constructed with free labor and government-provided materials over the past few years. For example, the cost of the 2,600 seat theater in Hargesa was reduced from $1.3 million to $900,000 according to local officials there.

ONE OF THE world's 20 poorest nations, Somalia has won praise from the World Bank and other international development agencies for its national "bootstrap" approach to development and its success in getting everyone from the top leadership to the isolated and indifferent desert nomad and black-country peasant directly involved in the slow and arduous task of nation-building.

As a result, Somalia has attracted the attention and confidence of a broad spectrum of nations, from the conservative oil-wealthy nations to China and the Soviet Union, and fortign aid has been pouring in at an impressive rate.

"There is so much aid coming in now that Somalia cannot absorb it all," remarked one Western diplomat.

Between 1972 and 1975, Somalia was given or promised more than $630 million in development funds, some of it earmarked for drought relief and rehabilitation projects, but the bulk of it for new industries and badly needed roads, ports and other basic infrastructure.

The main aid donors have been the World Bank, China and both the radical (Iraq and Libya ) and conservative (Kuwait and Saudi Arabia) oil-rich Arab states. The Soviet Union, this country's main foreighn ally, has put the Somali armed forces into one of black Africa's best equipped ones. But it has also expanded the port at Berbera, built a new airport at Kismayu and helped to develop Somalia's fishing industry.

The United States and Britain have been noticably alone among the majors Western powers in ignoring the Somali revolution, Marxist in name and theory, but above all extremely nationalistic in spirit. Belatedly now, both Washington and London are seeking to improve their ties with Somalia and offering to start up aid programs.

For the Arab countries, Somalia apaparently is regarded as a kind of "mini-Sudan," a land of rich but dormant agricultural potential that could help to feed the nearby Arab world. While there is no long-term Arab economic development plan for Somalia as there is for Sudan, the Arab governments reportedly have expressed their willingness to help finance a $2 billion to $3 billion program to open up nearly 600,000 acres of farmland along the Juba river in southern Somalia. This would turn Somalia into a big food exporter.

Somalis are understandably proud of the strides they have made, particularly since the military under President Mohammed Siad Barre took over the government in 1969 and scrapped the bankrupt civilian political system that was suffering from an excess of party politics (84 parties) while the country wallowed in unrelieved poverty.

At independence from Italian and British colonial rule in 1960, Somalia had just one paved road - a street in the capital - three schools with 55 students and about 20 university-trained people, according to Somali accounts. Even as late as 1969, when the military took power, there were only four factories in the entire country.

Today, Somalia boasts 25 sew industries with 10 more secheduled for completion within one year: an Italian and Russian-staffed university attended by 2,000 students and a primary school population of 220,000 close to 1,000 miles of hardtop roads, a tenfold increase in the fish catch to 50,000 tons in the past five years, and thousands of new irrigated acres of land under cultivation.

For all this impressive development activity, the Somali economy remains of postage stamp size, with less than $100 million in exports last year and a trade balance deficit of $126 million plugged by foreign assitance.

At the heart of Somalia's approach to development has been a slightly militaristic regimentation of the population, of apparent Chinese inspiration with its numerable exuberant "crash programs." But it has taken on tinges of "Stalinism" when it comes to security matters, where the Soviets are the main advisers.

It is the Somali state security system, apparently aimed at isolating the population as much as possible, including Somalia's beautiful and gracefully dressed women of African fame, from contact with outsiders that provokes the loudest complaints from foreign residents here.

All diplomats are closely watched and generally confined to travel within a 25-mile radius of the capital. Altogether, they have precious little contact with Somalis or Somalia. Anonymous nighttime calls to their homes to check to see if they are there are not uncommon and occasional break-ins by security officials also occur.

For example, the home of the U.S. ambassador John L.Loughran was entered April, 19 in his absence and his files rifled, apparently in a search for material that might be used against him by the security police. Nothing else but book notations and references was stolen. The glass of on window was knocked outward instead of inward in a clumsy attempt to make it look like an ordinary burglary.

Weighing in the balance against these excesses of Somalia's Soviet style security apparatus and are the obvious positive benefits for development

Work habits, one comes to sense even in a brief stay in the country were once all too leisurely and a strong dose of social discipline neccessary to ocercome this as well as a strong Somali nomadic individualistic spirit. The struggle, however, does not appear to be over.