Stephen Goldsmith is deputy mayor for operations for the City of New York.

Government isn't a game of perfect. When terrible things happen, like the death of a child under the care of protective services, an oil leak in the Gulf or construction fatalities, public officials react. Sometimes, they overreact.

When public officials seek to eliminate risk -- that is, act to totally eliminate risk, as opposed to merely reduce it -- you can be certain that nobody is thinking about the high cost of no risk.

Consider Interior Secretary Ken Salazar's efforts to halt most oil drilling off the Gulf Coast. The secretary's basic theory was that he could significantly reduce risk to the Gulf and its beaches with a deep-water drilling moratorium. This thinking is irrefutable. It is also imprudent.

Louisiana Sen. Mary Landrieu highlighted just how imprudent in her June 11, 2010, letter to President Obama. In it, Sen. Landrieu estimated that idling the 33 active deepwater rigs in the Gulf would affect the employment of roughly 38,000 individuals. As the senator noted, "That's like closing 12 large motor vehicle assembly plants in one state, all at once." And that doesn't even take into account the thousands upon thousands of additional service-sector jobs generated by oil and gas production off the Louisiana shore. All in all, the oil and gas sector employs a full 15 percent of the state's workforce.

Salazar's risk-stopping moratorium was an economically devastating move for Landrieu's state.

New York City Buildings Commissioner Robert LiMandri also oversees a risky world. Finding the balance between safety and economic activity is a serious challenge for him as well.

LiMandri took office in April 2008, soon after two major construction accidents claimed nine lives. At the time, Mayor Michael Bloomberg gave LiMandri one assignment: Make construction safer in the city. With an angry press corps, LiMandri could have eliminated risk altogether simply by shutting down construction -- with enormous costs. Instead, he took a number of steps to enhance safety, including increasing the training and attention of the inspectors, as well as the penalties for wrongful behavior.

Under LiMandri's watch fatal construction-related accidents fell by 84 percent in 2009, his first full year as commissioner. But despite, or perhaps because of, this success, there is an ongoing tension between the need for efficient construction and speed vs. a commitment to safety. As things stand, the permitting and inspection process is so expensive that it slows and sometimes stops construction. At a certain point, these aggregate costs reduce construction and occupancy, and thus contribute to reduced job growth. These secondary economic impacts bring a different set of costs to the city, costs like unemployment and its consequences.

All public decisions, especially the difficult ones, raise these issues. The drilling issues in the Gulf and the construction issues in New York appear to have little in common, but they do share one trait: each boils down to risk management. And no matter how widely divergent such issues seem, managing risk almost always presents a similar set of problems.

LiMandri could have reduced deaths and injuries to zero by stopping construction altogether -- at an unacceptable cost. It turns out that we engage in highly risky activities -- like deep water drilling, mining or construction -- because these risky activities are also highly valuable. Otherwise, why risk it?

This reality is obvious to everyone, but politics isn't always about reality -- it's about perception, too. In one city, a child died when under custody of the child welfare system. The head of the children services agency expressed deep sorrow and committed to improvements, but opined that similar future tragedies were inevitable. This statement is regrettably true. But this commissioner was called into the mayor's office and told in no uncertain terms that he was never to admit that such a thing could ever happen again -- as if by denying reality we could change reality.

When failure occurs and elected officials see a series of ugly headlines describing tragic fatalities of whatever sort, the spectacle of disaster can convolute the normal assessment of risk. Extreme measures are embraced.

The upshot is that government -- especially these days, when disasters are drilled into our conscience by a relentless news cycle -- often stumbles in risk management situations. And the automatic response to stumbling -- as even the most coordinated people know -- is always the same: The body reacts without the brain, trying to keep itself from falling. In these instances we're beyond all possibility of subtlety, compromise or rational assessment. It's all gut reaction, and almost always all or nothing. Governments thrown into such circumstances end up acting like an old light switch: It's either on or off.

I met with a large developer recently who complained bitterly about the enforcement costs. It turns out that building inspectors sometimes stop construction on entire sites when they come across a potential problem in just one area. Minor, often localized problems end up throwing a wrench into construction schedules. Inspectors often fail to distinguish between a slip-shod construction site, rife with safety hazards, and a well-run site that happens to have a minor problem. Both get totally shut down at the first sign of a problem. Risk drops to zero, but at a high cost.

Managing risk is an everyday activity for public officials who must constantly balance actual risks and perceived risks that affect voters. Clear rules help. But what helps most is a well-trained, well-equipped workforce that uses data to drive decisions. This allows regulators to distinguish serious problems from the not-so-serious, and between a well-run business and one that is consistently skirting the rules.