Aug 21st 2008 | ATHENS AND BEIJING
From The Economist print edition

The lofty theory, and tough reality, of a link between two peoples who have always known the meaning of diaspora

IT IS an easy speech to write. At any meeting between dignitaries from Greece and China, dutiful reference is made to the two nations’ ancient cultures, both of which left a tangible legacy in the shape of high-quality ceramics, sculptures and the musings of poets and philosophers. A bit more daringly, it might be noted that the two nations have been pinching one another’s secrets for at least 1,500 years—since Christian monks smuggled silkworm eggs from China to Byzantium in hollow canes.

And anyone who has the patience to peruse government websites will discover that 2008 is “Hellenic Year in China”—as the larger nation (by a factor of more than 100) succeeds the smaller as host of a sporting festival that began in Greece. Beijing’s theatre-goers are duly being treated to a new interpretation of the classical play, “Medea”, by Dimitris Papaioannou, a Greek director whose dazzling shows began and ended the 2004 Olympics. And George Koumentakis, who put together the music for the 2004 games, has gracious things to say about the Beijing opening—“subtle rather than ostentatious, worthy of an emerging superpower that feels quite comfortable with its past.”

But look away from those diplomatic dinners and gala performances, and consider the real lives of people, rich and poor, with an eye for the chances offered by a globalising world. It turns out that the Chinese and the Greeks are interacting in all sorts of hard-headed ways, never dreamed of by a cultural attaché or choreographer.

Most obviously, quite a few Greek shipowners have become billionaires since 2004 thanks to the “China trade”: the transport of coal, oil, iron ore and other bulk commodities which stoke China’s growth. Last year Greek ships carried about 60% of China’s imports of raw materials. Greek owners have poured a sizeable percentage of their profits back into China in the form of orders for new ships. With the big state-owned Chinese yards now working at full capacity, small private ones have entered the game—leaving many a bemused Greek buyer stranded in the Chinese boondocks, wondering whether his would-be suppliers really can bang a ship together.

Although this growth may be starting to slow—bulk freight rates are down 30% from a peak in May—the Greek shipping industry will continue benefiting from long-term charter deals with existing customers. As one Greek banker says, “this has been a once-in-a-century shipping boom.”

The Greek government, too, is deeply involved in business with China. In June Cosco, the biggest Chinese state-owned shipping company, won a tender to build and operate a new container terminal at the port of Piraeus. A 35-year concession gives China access to a strategic hub for exports to Western Europe and the emerging markets of the Black Sea. The deal should bring investment of more than €600m ($900m) and create 1,000 dockers’ jobs. “The Chinese were desperate for a foothold in the Mediterranean and we were able to provide it,” purrs a Greek official.

For a much grittier slice of Sino-Hellenic reality, visit some of the poor parts of Athens, or certain Greek islands, where Chinese retailers—selling cheap consumer goods, especially clothes—have become part of the urban landscape.

The local Hellenes are at once bemused, suspicious and surreptitiously grateful. Since 1990, once-homogenous Greece has received a vast influx of labour migrants from ex-communist Europe, Africa and Asia. But the Chinese, mostly from the south-eastern provinces of Zhejiang and Fujian, are unlike all the others—they don’t come as cheap labourers, but as small entrepreneurs with capital of their own. The rigour of life in their home regions has made them pretty robust: those areas were dirt-poor in the final years of the Maoist era but boomed after being declared special economic zones. And just like many Greek islands, that bit of China has a long memory of sending its brightest sons overseas to seek their fortunes.

Compared with the Albanian builders and Filipino nurses who also live in Athens, the city’s Chinese community is elusive. The lanterns that mark out Chinese shops are easy to spot—but the number of Chinese people visible on the street, or even at the till, is small.

A rumour mill gone crazy

This “invisibility” fuels many myths, says Tracey Rosen, a doctoral student who is studying the 30,000 or so Chinese who live in Greece. There are rumours that all their merchandise is made on ships on the high seas, where no labour laws apply, and that it can be dangerous—televisions that explode, underwear that gives you a rash. On Crete, says Ms Rosen, local Greeks rarely admit going to Chinese stores; they say the only customers are other poor immigrants. But older Greek women, in particular, do quietly patronise the Chinese, often getting clothes for daughters and granddaughters whose extravagance risks busting the family budget. In some contexts, the words “cheap” and “Chinese” are interchangeable. When a Greek electronics chain tells its customers that “we’ve become Chinese!” that means a sale is on.

With no more than minimal Greek, the Chinese have little to do with the local police, and get scant help when their cash or merchandise is stolen. Most retailers are young couples who leave their children in the care of grandparents back in China, and their life in Greece can be hard.

On the road from the Cretan port of Heraklion to the south coast, there is a Chinese shop in almost every settlement—even, for example, in Agia Varvara, whose other features are one paved intersection, a bread shop and a garage. The young retailer from Wenzhou in Zhejiang province laments, in a south Chinese twang, that business is “pretty bad”—and his neighbour, the Greek baker, rather pointedly concurs.

But some Cretans have warmer words for the newcomers. “We are all children under God,” declares a local lady in a village near Rethymnon. She likes the fact that the Chinese are clean and polite—and feels sorry for the ordinary Chinese vendors in the local street-market who seem to be working under the sway of a rich and powerful compatriot.

In kinder moments, Greeks recall the deep commonality between all people who know the bittersweet experience of diaspora—an experience that involves responding nimbly to every opportunity, in the knowledge that it may end very quickly. One example: the hardy folk from the Greek island of Kefalonia who migrated, after 1900, to Manchuria, where they flourished in the liquor and property business. Their world collapsed in 1949 when the Communists took power.

Sociology and economics aside, any relationship between two nations also comes down to individuals who straddle the gap in surprising ways. Take Ioannis Solos, a young practitioner of traditional medicine from the Greek town of Agrinion who lives in Beijing. Having studied for five years under top Chinese professors, he now co-writes learned papers on Eastern medicine in Mandarin, drawing on a deep knowledge of ancient Chinese philosophy and cosmology. “I’ve gradually come to realise that Chinese thought is very simple and very profound,” he says. “When I was a child in Greece, my friends called me o kinezos—the Chinese—but they didn’t know how prophetic the nickname was.”

Advertisements

By Neil McAllister
August 21, 2008

The more I hear about the ongoing efforts to revise the leading Web standards, the less convinced I am that we’re approaching Web-based applications the right way.

The latest dust-up involves ECMAScript, the international standard that forms the basis of the JavaScript language. Last week, the committee in charge of the language voted to abandon the proposed ECMAScript 4 standard in favor of a much less ambitious revision, dubbed ECMAScript 3.1.

Had the work continued, it would have brought big changes. “Programming ‘in the large’ has been a problem with untyped languages like JavaScript,” Adobe’s Ed Rowe told me in an interview earlier this year. “That’s why Adobe has been working with [ECMA] on ECMAScript 4 … to introduce concepts that are compatible with building large-scale applications.”

But while large-scale application development might sound good to Adobe, guaranteed it wouldn’t have worked for everyone. The history of traditional systems programming languages is evidence enough of that.

For every methodical, disciplined Java programmer there’s a Perl hacker who would much rather play everything by ear. Strong typing, packages, and namespaces may make it a lot easier to maintain large applications, but they’re virtually useless to any Web coder who just wants to bash out a little bit of UI glitz.

In fact, the very concept of an all-purpose programming language that’s designed by committee is questionable. Once before, a bunch of very smart people got together to write the specification for what was supposed to be the ultimate programming language. It was secure, robust, and so standardized that nothing was left to interpretation. Remember Ada? No? That’s probably because, once the specifications became available, the language was so strict and inflexible that most folks preferred to code in C.

So if nobody ever managed to come up with the ultimate, perfect language for systems programming, what makes us think we can do it for the Web? If anything, the more we talk about building large-scale Web applications, the more we should recognize that a single style of programming will never suit every job.

I’m a big fan of the Model-View-Controller design pattern. It doesn’t work well for everything, but it can often provide invaluable guidance in the application design process. In a nutshell, one of its core tenets is to separate the View — the presentation of data — from the data itself (the Model) and the underlying logic that manipulates it (the Controller).

So here’s an idea: Your Web browser window is a View. Maybe it’s high time we stopped trying to force it to be a Controller, too.

Ever since the early days of Web browsers we’ve had this language, JavaScript. Over the years, we’ve demanded more and more of it, to the point that we’re now talking about using it to build entire applications. The simple truth, however, is that JavaScript will never be good for everything.

Rather than shoehorning more and more functionality into the browser itself (and going through all the rigorous standardization procedures that this requires), maybe it’s time we separated the UI from the underlying client-side logic. Let the browser handle the View. Let the Controller exist somewhere else, independent of the presentation layer.

We already have a means to achieve this separation for client-side code today: browser plug-ins. Of course, most Web developers will tell you that plug-ins are a Bad Thing. Every time you force the user to download and install a plug-in, says the popular wisdom, you throw a roadblock in front of your code. But is that really true?

Early browser plug-ins were mostly designed to deliver multimedia. Typically it didn’t take long for them to become vehicles for online marketing — and this at a time when most computer users connected to the Internet via dial-up. Little wonder that no one could be bothered to download them.

The modern counterexample is Google Gears. Install the Gears plug-in once, and every Gears-enabled application gains additional functionality. To date, the list of enabled sites includes not only Google Docs and Google Reader, but MySpace, Picasa, and even WordPress blogs.

People tend to focus on Gears’ ability to allow Web applications to be used while offline. They overlook the WorkerPool module, which allows JavaScript code to run in the background, independent of the code on the main page. WorkerPool is a standalone code execution engine; it just happens to run the same JavaScript as an ordinary browser.

So why JavaScript? Why not Python, or Lisp, or some other, new language designed with an alternative Web application development methodology in mind? If the application that it powers is compelling enough, the incentive to install a plug-in is high — particularly in this age of readily-available broadband.

An external browser module capable of executing most of the proposed ECMAScript 4 specification already exists: It’s the Adobe Flash plug-in. Other platforms are available as plug-ins, as well, including Curl and REBOL.

As Web developers, we tend to shy away from these alternatives, but only because of the never-ending efforts to refine and standardize JavaScript within the browser itself. Because it’s a Web standard, we tell ourselves, JavaScript is the “purer” option.

But if sticking to a single way of doing things is what we want, then why reinvent the wheel? We already have an all-purpose client that’s capable of acting as a front end to a wide variety of applications, from databases to e-mail. It’s installed at thousands of enterprises worldwide, right now. It’s called Lotus Notes.

Is that the way we’re heading? Is that really the model for the browser of tomorrow? Or is it time for the Web development community to start thinking outside the box?

By NICHOLAS D. KRISTOF (The New York Times)
Published: August 6, 2008

When the Olympics open on Friday, the Dalai Lama won’t be there. Each side put out feelers about his attendance and was tantalized by the idea, but in the end the mutual distrust was too great to overcome.

Tibet is one of the major shadows over the Olympics and over China’s rise as a great power, sullying its international image and triggering unrest that is likely to worsen in coming years. Yet that doesn’t have to be.

In June, I sat down for a private meeting with the Dalai Lama, and we talked at length about what kind of a deal he and China might be willing to accept. He was far more flexible and pragmatic about a resolution of the Tibet question than public statements had led me to believe. But he also wonders if his engagement policy with China is getting anywhere: If the stalemate continues, he may just give up on Beijing.

I have continued the discussion with Tibetan officials since then (just as I have had similar discussions with Chinese officials), and China’s perception of the Dalai Lama as sticking rigidly to old positions is mistaken. The Dalai Lama recognizes that time is running out, and he is signaling a willingness to deal — comparable to the way President Richard Nixon sent signals to Beijing that he was ready to rethink the China-U.S. relationship before his visit to China in 1972.

One signal is this: For the first time, the Dalai Lama is willing to state that he can accept the socialist system in Tibet under Communist Party rule. This is something that Beijing has always demanded, and, after long discussion, the Dalai Lama has agreed to do so.

“The main thing is to preserve our culture, to preserve the character of Tibet,” the Dalai Lama told me. “That is what is most important, not politics.”

That is a significant concession, and China must now reciprocate. The present track of talks between the Communist Party’s United Front Work Department and the Dalai Lama’s representatives will never get anywhere. The only hope is for Beijing to pluck Tibetan affairs from the United Front officials and hold direct talks between the Dalai Lama and either President Hu Jintao or Prime Minister Wen Jiabao, negotiating until a deal is reached.

In one sign that Chinese leaders are also thinking creatively about new approaches, Beijing secretly raised the idea of the Dalai Lama visiting China and participating in a memorial service for those who died in May’s Sichuan earthquake. That was bold; the Dalai Lama has not entered China since 1959. Both sides should now aim for a visit to mark the earthquake’s six-month anniversary in November, followed by serious negotiations.

It’s possible to devise an agreement that leaves both China and the Tibetans much better off — if they hurry. Once the Dalai Lama dies — he is 73 — then a deal could be impossible for another generation because no one would be able to unify the Tibetan people behind a new plan. By then much of Tibet is likely to have been drowned in a sea of Chinese migration, and some frustrated young Tibetans may have turned to terrorism. In my interviews in Tibetan areas of China this year, young people told me repeatedly of their frustration that the Dalai Lama is too conciliatory and that a violent liberation movement would be necessary after his death.

Here is one plausible outline of what a settlement might look like, although both sides would surely flinch at some terms:

The Dalai Lama would dial back to some degree on demands for political autonomy for Tibet, while the Chinese government would offer more cultural and religious freedoms. There would be no “one country, two systems” approach as there is for Hong Kong, and the existing Communist Party control mechanisms would remain in place.

As the Dalai Lama has said, he would play no political role after a settlement, but he would be free to enter and leave China with his aides and to communicate freely. He could travel within Tibetan areas, in coordination with the Public Security Ministry, to ensure that there are no upheavals. China would also release all Tibetans imprisoned for political offenses — though not for crimes of violence — upon the signing of a deal.

Much more sensitive is the Dalai Lama’s call for all Tibetan areas to be placed under one administration. That is usually interpreted to mean a huge expansion of the political boundaries of the Tibet Autonomous Region to encompass about one-fourth of China, taking in parts of Qinghai, Gansu, Sichuan and Yunnan Provinces. Chinese leaders were open to redrawing the boundaries in the past, but today China is as determined not to make such changes as Tibetans are to get them.

One way to bridge that gulf would be to create a Regional Authority for Tibetan Affairs that would administer key aspects of life in all Tibetan areas, particularly education, culture and religion. Already, for example, Tibetan-language school textbooks are harmonized in different provinces, and this regional authority would likewise oversee practical aspects of life in areas with Tibetan populations, all under Chinese law. This would allow Tibetan areas to be placed under a single administration without changing political boundaries.

On the Chinese side, the crucial concession would be to restrict migration into all Tibetan areas, inside and outside the “autonomous region,” through China’s existing system of residence permits. The Chinese authorities would stop issuing resident permits, known as hukou, to non-Tibetans for any Tibetan area, and would grant temporary residence permits, or zhanzhuzheng, only when no Tibetan is available to take a job. This would halt the flood of Han Chinese into Tibetan areas.

The Chinese government would also ease restrictions on monasteries and on the intake of monks, and curb the mandatory “patriotic education” campaigns that only leave Tibetans feeling less patriotic. Young boys would be allowed to enter monasteries, but the monasteries would then be obliged to teach the boys the Chinese state curriculum, including Chinese language, in addition to religious education.

The Tibetan language would also be used in government offices in all Tibetan areas, alongside Chinese, and there would be a new push (as there was in the 1980s) to increase the proportion of ethnic Tibetans holding government and party positions. The upshot would be a Tibet that remains politically under the control of the Communist Party. It would not be a democracy or a multiparty system, but it would be able to preserve its character indefinitely as a distinctly Tibetan and Buddhist region, both inside and outside the formal Tibet Autonomous Region. And Tibet can be free only if it is first preserved.

For the Chinese, such an agreement would resolve the Tibet question and end an international embarrassment, as well as prevent the rise of protests and terrorism for decades to come.

My conversations with both sides make me think that this is achievable. The Dalai Lama recognizes that his past efforts haven’t worked in the face of increasingly hard-line Chinese policies, so he is willing to try new approaches.

As for China, it has raised Tibetan standards of living impressively over the last 20 years, but its repression has lost Tibetan hearts and minds. Vicious Chinese denunciations of the Dalai Lama, and particularly the contempt that some local Chinese officials display toward Tibetan culture, exacerbate the resentment. As a start, China should remove the hot-headed Communist Party secretary for Tibet, Zhang Qingli, who brightens any room by leaving it.

The Dalai Lama knows that other peacemakers have broken the ice with bold initiatives to prove their seriousness; we discussed Sadat’s visit to Israel as one such move. So the Dalai Lama is reaching out. That is one reason he agreed that I could report his acceptance of Communist Party rule.

“On account of Buddhism’s emphasis on rational thinking, the Tibetans are capable of embracing reality by accepting some of the de facto situation on the ground,” added Lodi Gyari, the Dalai Lama’s envoy to talks with China.

The senior Chinese leadership should respond by expressing serious interest in talks at the presidential or prime ministerial level. In ancient days, the Olympics were a time to suspend conflict. In that spirit, the two sides should get to work to prepare for a visit by the Dalai Lama in November, followed by top-level negotiations aimed at a historic resolution of the Tibet question.

The ball is in the Chinese court.

Wiki: Data Mining

八月 6, 2008

Data mining is the process of sorting through large amounts of data and picking out relevant information. It is usually used by business intelligence organizations, and financial analysts, but is increasingly being used in the sciences to extract information from the enormous data sets generated by modern experimental and observational methods. It has been described as “the nontrivial extraction of implicit, previously unknown, and potentially useful information from data” and “the science of extracting useful information from large data sets or databases.”

In recent years, data mining has been widely used in area of science and engineering, such as bioinformatics, genetics, medicine, education, and electrical power engineering.

In the area of study on human genetics, the important goal is to understand the mapping relationship between the inter-individual variation in human DNA sequences and variability in disease susceptibility. In lay terms, it is to find out how the changes in an individual’s DNA sequence affect the risk of developing common diseases such as cancer. This is very important to help improve the diagnosis, prevention and treatment of the diseases. The data mining technique that is used to perform this task is known as multifactor dimensionality reduction.

In the area of electrical power engineering, data mining techniques have been widely used for condition monitoring of high voltage electrical equipment. The purpose of condition monitoring is to obtain valuable information on the insulation’s health status of the equipment. Data clustering such as self-organizing map (SOM) has been applied on the vibration monitoring and analysis of transformer on-load tap-changers(OLTCS). Using vibration monitoring, it can be observed that each tap change operation generates a signal that contains information about the condition of the tap changer contacts and the drive mechanisms. Obviously, different tap positions will generate different signals. However, there was considerable variability amongst normal condition signals for the exact same tap position. SOM has been applied to detect abnormal conditions and to estimate the nature of the abnormalities.

Data mining techniques have also been applied for dissolved gas analysis (DGA) on power transformers. DGA, as a diagnostics for power transformer, has been available for centuries. Data mining techniques such as SOM has been applied to analyse data and to determine trends which are not obvious to the standard DGA ratio techniques such as Duval Triangle.

A fourth area of application for data mining in science/engineering is within educational research, where data mining has been used to study the factors leading students to choose to engage in behaviors which reduce their learning and to understand the factors influencing university student retention.

Other examples of applying data mining technique applications are biomedical data facilitated by domain ontologies, mining clinical trial data, traffic analysis using SOM, et cetera.

Editorial
Published: August 5, 2008

For so long now, there has been almost nothing but bad news about the likely fate of gorillas. They have been the victims of deforestation and incessant warfare in Central Africa. They have been hunted for meat. They are susceptible to the Ebola virus. Estimates in the 1980s suggested that there were roughly 100,000 western lowland gorillas — one of four subspecies. Since then, that number was thought to have declined by half.

But a rigorous new census of western lowland gorillas conducted by scientists from the Wildlife Conservation Society has found as many as 125,000 of them living in two northern regions of the Congo Republic — more than double the number thought to exist elsewhere throughout their range.

This news is that rarest of things: a second chance for a critically endangered species. The number itself — and the scientists’ confidence in it — is the result of an intensive search of inaccessible rain forests and swamps. It also resulted from counting gorilla nests, rather than the secretive creatures themselves.

These gorillas have been protected by their remoteness and by the inaccessibility of their habitat. But remoteness will ultimately be no deterrent to the threats that have decimated them elsewhere. This extraordinary discovery should be a powerful incentive to create new protected areas to help western lowland gorillas the way other national parks in the Congo Republic have already done. But it will take more than that. Without careful management of the forest resources that surround protected areas — and strict enforcement — a national park is nothing more than a line on a map.

This news is an utter exception to the fate of primates across the globe. A recent, comprehensive survey, presented at the same conference as the news of the gorilla census, indicates that more than half of primate species face extinction. Scientists are finding new species — 53 since 2000 — but too often finding a new species simply means having a chance to watch it die away.

By CHARLES DUHIGG
Published: August 5, 2008

The chief executive of the mortgage giant Freddie Mac rejected internal warnings that could have protected the company from some of the financial crises now engulfing it, according to more than two dozen current and former high-ranking executives and others.

That chief executive, Richard F. Syron, in 2004 received a memo from Freddie Mac’s chief risk officer warning him that the firm was financing questionable loans that threatened its financial health.

Today, Freddie Mac and the nation’s other major mortgage finance company, Fannie Mae, are in such perilous condition that the federal government has readied a taxpayer-financed bailout that could cost billions. Though the current housing crisis would have undoubtedly caused problems at both companies, Freddie Mac insiders say Mr. Syron heightened those perils by ignoring repeated recommendations.

In an interview, Freddie Mac’s former chief risk officer, David A. Andrukonis, recalled telling Mr. Syron in mid-2004 that the company was buying bad loans that “would likely pose an enormous financial and reputational risk to the company and the country.”

Mr. Syron received a memo stating that the firm’s underwriting standards were becoming shoddier and that the company was becoming exposed to losses, according to Mr. Andrukonis and two others familiar with the document.

But as they sat in a conference room, Mr. Syron refused to consider possibilities for reducing Freddie Mac’s risks, said Mr. Andrukonis, who left in 2005 to become a teacher.

“He said we couldn’t afford to say no to anyone,” Mr. Andrukonis said. Over the next three years, Freddie Mac continued buying riskier loans.

Mr. Syron contends his options were limited.

“If I had better foresight, maybe I could have improved things a little bit,” he said. “But frankly, if I had perfect foresight, I would never have taken this job in the first place.”

Mr. Andrukonis was not the only cautionary voice at Freddie Mac at the time. According to many executives, Mr. Syron was also warned that the firm needed to expand its capital cushion, but instead that safety net shrank. Mr. Syron was told to slow the firm’s mortgage purchases. Instead, they accelerated.

Those and other choices initially paid off for Mr. Syron, who has collected more than $38 million in compensation since 2003.

But when housing prices began declining in 2006, choices at Freddie Mac and Fannie Mae proved disastrous. Stock prices at both companies have fallen by more than 60 percent since February, destroying more than $80 billion of shareholder value.

More than two dozen current and former high-ranking executives at Freddie Mac, analysts, shareholders and regulators said in interviews that Mr. Syron had ignored recommendations that could have helped avoid the current crisis.

Many of those interviewed were given anonymity for fear of damaging their careers by speaking publicly.

Now, some outsiders are saying that Mr. Syron and the top executive at Fannie Mae — some of the highest-profile figures in the business world — should be replaced.

“The top people should be booted out, and replaced by executives who have the confidence of the markets,” said Janet Tavakoli, a finance industry consultant and observer of both firms. Large Freddie Mac shareholders, speaking on the condition of anonymity, echoed those sentiments.

Mr. Syron and the Fannie Mae chief executive, Daniel H. Mudd, defended their choices, saying in interviews that they did not anticipate that the housing market would decline so quickly and that they were buffeted by conflicting pressures.

“This company has to answer to shareholders, to our regulator and to Congress, and those groups often demand completely contradictory things,” Mr. Syron said in an interview.

Indeed, executives of both companies maintain that one of the reasons the firms hold so many bad loans is that Congress has leaned on them for years to buy mortgages from low-income borrowers to encourage affordable housing. In 2004, Freddie Mac warned regulators that affordable housing goals could force the company to buy riskier loans.

Others, however, dismiss that explanation. “Sure, it’s hard to deal with the pressures of Congress and shareholders and regulators,” said a former high-ranking Freddie Mac executive. “But that’s why executives get paid so much. It’s not acceptable to blame those pressures for making bad choices.”

In a statement, Freddie Mac said executives were unable to verify that Mr. Andrukonis’s memorandum existed, and that the company’s default and delinquency rates were substantially lower than other firms. “There is little to nothing that Freddie Mac could have done to prevent the losses that it is now incurring,” wrote company spokesman, David R. Palombi.

Mr. Mudd said the companies were victims of circumstance.

“You’ve got the worst housing crisis in U.S. recorded history, and we’re the largest housing finance company in the country, so when one goes down, the other goes with it,” he said. A Fannie Mae spokesman, Brian A. Faith, said that beginning in 2005, executives “sounded the alarm” about riskier loans and began limiting their purchases.

The depths of Freddie Mac’s problems are complicated by its long-planned, continuing search for a chief executive to replace Mr. Syron, who is expected to remain chairman. Two people who were approached — Kenneth I. Chenault of American Express and Laurence D. Fink of BlackRock — said they did not want to be considered for the position.

Some outsiders are surprised to learn that among the candidates the company is considering is Alan Schwartz, who headed Bear Stearns as it collapsed.

Mr. Chenault, Mr. Fink and Mr. Schwartz could not be reached or declined to comment.

Mr. Syron joined Freddie Mac as chief executive and chairman in 2003, after the company revealed it had manipulated earnings by almost $5 billion. He came to Freddie Mac after serving as chairman of the Thermo Electron Corporation, a scientific instruments firm, and of the American Stock Exchange. An economist with a Ph.D. and the first in his family to graduate from high school, Mr. Syron was welcomed as an unpretentious but politically astute leader.

Mr. Mudd was promoted to chief executive of Fannie Mae the following year, after that company was also accused of accounting errors totaling $6.3 billion. His compensation has totaled more than $42 million.

By the time both men took over, the firms had perfected the art of making money by capitalizing on the perception they were implicitly backed by the government. That belief allowed Fannie and Freddie to borrow at relatively low rates and use those funds to buy mortgages as investments. The companies also collected fees in exchange for guaranteeing that borrowers would repay other home loans.

By the end of 2007, the firms held mortgages worth more than $1.4 trillion combined, and guaranteed payments on loans worth $3.5 trillion more.

Both firms had sophisticated systems to hedge against risks. But they remained exposed to one unlikely, but potentially catastrophic possibility: a wide-scale decline in national home prices.

The only real protection against such a downfall was purchasing only the safest loans.

However, the companies were constantly under pressure to buy riskier mortgages. Once, a high-ranking Democrat telephoned executives and screamed at them to purchase more loans from low-income borrowers, according to a Congressional source. Shareholders attacked the executives for missing profitable opportunities by being too cautious.

Mr. Syron and Mr. Mudd eventually yielded to those pressures, effectively wagering that if things got too bad, the government would bail them out.

“The thinking was that if something really bad happened to the housing market, then the government would need Freddie and Fannie more than ever, and would have to rescue them,” Mr. Andrukonis said. “Everybody understood that at some level the company was putting taxpayers at risk.”

Representatives of Mr. Syron and Mr. Mudd said the firms never made choices assuming the government would intervene. Both said they balanced shareholder and Congressional demands against market realities.

For years, the companies collected rich profits. But some executives grew increasingly concerned.

Mr. Andrukonis wrote his memo in 2004. At the time, he also briefed the risk oversight committee of the board of directors, but did not share his memo with them, he said. A member of that committee declined to return phone calls.

Soon thereafter, Freddie Mac’s head of capital compliance and oversight, Donald Solberg, counseled Mr. Syron to maintain a thick capital cushion, according to multiple people familiar with those discussions. Mr. Solberg continued making that recommendation until early 2007, when he left the company. Mr. Solberg declined to comment on his conversations.

Last year, Treasury Secretary Henry M. Paulson Jr. and the Federal Reserve chairman, Ben S. Bernanke, privately urged both companies to raise more money. At one point, Mr. Bernanke threatened to publicly scold the companies if they did not raise more cash.

Beginning in November, Fannie Mae raised $14.4 billion from shareholders over a six-month period.

But Mr. Syron was more resistant. Freddie Mac raised $6 billion in preferred stock last year, but at a March conference in New York, Mr. Syron combatively dismissed suggestions he would raise more simply because officials told him to.

“This company will bow to no one,” Mr. Syron told a room of investors and analysts. Despite promises, the company has delayed a planned $5.5 billion stock sale. Because of that delay, the effective cost of raising funds has skyrocketed as the company’s share price has declined.

In a statement, Freddie Mac said Mr. Syron’s March comments focused on dilutive capital raising and that the stock sale was delayed because lawyers said it could not occur while the company was registering with the Securities and Exchange Commission. That process was finalized last month.

In 2007, as home prices were falling and defaults rising in some areas, people at both firms urged their chief executives to scale back on mortgage purchases. Fannie Mae shrunk its mortgage portfolio slightly.

Mr. Syron’s Freddie Mac, however, increased its portfolio by $17 billion.

That same year the companies posted combined losses of $5.2 billion. This year, they have announced losses of $2.4 billion, and analysts say they may lose an additional $24 billion or more.

Last month, after weeks of rumors and bad news, investors began dumping the companies’ shares, driving their stock prices down almost 60 percent apiece. The selling did not subside until Mr. Paulson unveiled a rescue plan with powers to inject billions of taxpayer dollars into the companies. That plan has not been activated, but the law, signed by President Bush last week, also gives the government sweeping new regulatory control over the firms.

“It basically worked exactly as everyone expected — when things got bad, the government came to the rescue,” said a second former high-ranking Freddie Mac executive. “But we didn’t expect it would come at the cost of a new regulator who now has the power to burrow into our business forever.”

In the last three weeks, the companies’ stock prices have recovered a small portion of their losses. Executives, however, remain concerned that more bad news could spark another panic.

Freddie Mac will report its second-quarter financial results Wednesday. Fannie Mae will release its results on Friday.

“I’ve had four other jobs as C.E.O., and I came out of them all pretty well,” Mr. Syron said. “What I’m working for right now is to save my reputation.”