25 October 2005

Bcc etiquette question

Suppose you have a friend J and he knows this other person K. You receive an e-mail that appears to be from J to K (not to you). Apparently J has Bcc'd you on this message.

Without getting into the content of the message itself, does this situation make you feel like you should treat the content of the message as private (just between you and J)?

23 October 2005

Laughter

Speculation on the purpose of laughter. No worse than any other theory I've heard, I guess.

Spooky answers to weird questions are a staple of old-school science fiction stories. Isaac Asimov wrote a really bad short story about the question of laughter. I don't remember the title. Perhaps “Jokester” is the one I'm thinking of.

22 October 2005

Here's another

The National Flood Insurance Program spends about $200 million annually subsidizing insurance for flood-prone properties. (I apparently pay about $1 of that each year.) I don't see why it shouldn't be scrapped.

In the U.S. law establishing the NFIP, Congress found that “many factors have made it uneconomic for the private insurance industry alone to make flood insurance available to those in need of such protection on reasonable terms and conditions”. Can anyone tell me what these “many factors” are? Private flood insurance is available... on terms that reflect the risk of flood damage.

The NFIP sounds like a typical government insurance program. It is mandated to charge premiums that are sufficient to cover the risks, plus the administrative costs of running the program. But it certainly doesn't do this in all cases—hence the $200M annual price tag—and I can't tell if it does so in the bulk of cases or not.

It sounds like a classic case of government doing something, at a loss, that private companies could just as well do at a profit. With a private market, you'd also get the benefits of competition (on price and service). What am I missing?

Flood plains

I heard an article about the Army Corps of Engineers on NPR earlier this week.

It sounds like Army Corps of Engineers flood control projects (levees), like interstate highway projects, are often pork-barrel job programs, the kind of district-specific spending that is the basic trading currency in Congress (blah).

But unlike highways, levees cause problems. Building a levee encourages people to build homes and businesses in the flood plain below. It can affect the landscape in unexpected ways, as in New Orleans where the levees directly caused the city to sink into a bowl-like shape. And it drains wetlands, removing a natural buffer that slows flood waters when a flood does occur (and, incidentally, killing all the wildlife that lives there).

Proposed solution: drop the requirement that Corps flood control projects have to demonstrate economic benefits outweighing their cost. NPR didn't give the impression there was anything wrong with this clearly insane idea, nor did they interview any opposing interest.

To me this sounds like a program that just needs to be cut.

17 October 2005

It's not an ethical debate

More evidence that the two sides in the culture war aren't communicating. San Francisco Chronicle:

Scientists are reporting two new ways of creating embryonic stem cells without killing viable embryos[...]

In one case, embryonic stem cells were made from a genetically abnormal embryo designed to be incapable of developing. The other method was an attempt to fashion stem cells from an embryo without damaging it.

I'm not sure what this is supposed to fix. The objection is that experimenting on human embryos is an affront to their dignity. Essentially everything having to do with human embryos is off-limits by this standard, including creating them for scientific research.

The opponents of stem cell research are the same people that opposed in vitro fertilization. The only thing to do is wait.

29 September 2005

A broken link is fixed

Someone wrote me mail:

Dear Jason,

http://jorendorff.com/toys/puzzle.html is a 404. It makes me sad
because I like the other foldout toys are very fun and make me happy.

He was right. The broken link appeared on a page of programmer toys, under the blurb: “This one is a bit of a puzzle. It shows you a few lines of code that have profound implications for the way hundreds of millions of people live every day—and asks you to figure out what the code does.”

I had to laugh, because nothing can deliver on that kind of promise, especially after the extra anticipation of waiting for the link to be fixed. Anyway, it's fixed now. If you know a little Python, take a look.

23 September 2005

Unix strikes again

Today at work someone wanted to add some third-party libraries to our version control system. So he typed p4 add vendorlibs/*.so*. Or so he thought.

The command spit out an incredible amount of garbage on his screen. Eventually we figured out he had actually typed pr add vendorlibs/*.so*. The only way this would be funnier is if pr were actually the print command. It's not, despite what the man page says. It's just a text formatting tool.

09 September 2005

Bloggers encourage donations

Crooked Timber will send you a free mix CD if you donate $100 to Katrina relief.

Asymmetrical Information counteroffers: a homemade pound cake for a $100 donation. (Or, a blog entry on the topic of your choice for $250. A risky offer, though the author prudently excludes her private life from the menu.)

Update: What the heck, I'll write on the topic of your choice if you give $50 to Katrina relief. E-mail me or leave a comment. (Not much of a prize, I know, but you don't want my cooking.)

08 September 2005

Hurricane Katrina

As the President says, there will be plenty of time in the months ahead to assess the government's performance. But it seems safe to say a few things:
  • It is correct to hold disaster response to a very high standard. There is nothing special about Katrina (its severity, suddenness, or unexpectedness; or the problems presented by New Orleans' unique geography) that should deflect criticism or excuse mistakes. Handling worst-case scenarios is FEMA's mission.

  • To date, criticisms of the response have been short on plain facts. A dispassionate timeline of events and responses is needed.

  • The mandatory evacuation probably saved tens of thousands of lives. Thousands more could have been saved by a determined effort to evacuate everyone. (It has been suggested that the city should have been evacuated much sooner, but that smells of hindsight.)

  • Barring the Red Cross from New Orleans while thousands of people were still desperate for food and water was unnecessarily cruel and likely cost lives. (More broadly, turning back individuals who went there to help seems like a bad idea to me, but I am apparently the only one.)

  • Every government account of anything related to the hurricane has been appallingly politicized, from Mayor Nagin's sleep-deprived rant to Lt. Cmdr. Sean Kelly's revised account of the Bataan's response. The President's observation that there will be time for criticism later hasn't prevented him or anyone else from conspicuously passing the buck.

  • The key people in the government didn't grasp the magnitude of what was happening. Neither did the media, which reported Katrina Monday and Tuesday with about the same tone as they reported Andrew (which killed about 65 people; Katrina probably killed thousands). Undoubtedly if the right people in government had been smart enough, prepared enough, and confident enough to ignore the media and proceed with the certain understanding that things were soon to get much worse, many lives could have been saved and much suffering avoided. Whether this is too much to expect from a government agency is an open question. More on this later.

30 August 2005

A prize is awarded

Ichabod's has a trivia question every day. The first three people to answer it get free coffee. Yesterday, the question was: What does the term zugzwang describe in the game of chess?

Zugzwang is one of my favorite words. The coffee was only so-so.

29 August 2005

How to win in Iraq

How to win in Iraq. This article is amazingly good. If all it did was explain what the hell is going on over there, it'd be worth reading. But that's just page 2 of 7.

Cliffs-notes version. Don't let the New York Times masthead fool you; David Brooks is a senior editor at the staunchly conservative Weekly Standard.

26 August 2005

Exchange rates

Can someone explain to me how governments can “pin” currency exchange rates?

China's currency, the yuan, apparently remained pegged to the U.S. dollar for years. How did they manage this? It seems like it would be easy for a third party to arbitrage this arrangement to smithereens. Here's how.

Let's assume for the sake of argument that the "correct" exchange rate is 5 yuan = 1 usd (U.S. dollar). That is, on average, a nonperishable good that goes for 1 usd in America can be had for 5 yuan in China. Now let's say the Chinese government has, by government fiat, set 10 yuan = 1 usd. Here's my brilliant plan:

  1. Buy 500 yuan worth of stuff in China.
  2. Sell it for 100 usd in America.
  3. Pocket 50 usd.
  4. Take the other 50 usd and buy 500 yuan. You can do this at any bank that accepts the mandated exchange rate.
  5. Repeat until there's no more stuff left in China, or no more consumer demand in America, or no more room for dollars in your pockets, or (as seems most likely) the banks wise up and stop giving away yuan.

Net result, you get infinite dollars. Who loses? The manufacturer in China got a fair price, as did the consumer in America. Only the bank got ripped off. So why do banks go along with exchange rate controls?

There are only a few explanations I can see. First, this brilliant plan might be impossible because the friction is simply too much. That is, the bank charges a fee for changing your money; and it costs something to ship the stuff from China to America; and there are taxes and tariffs to be paid; and occasionally you'll buy something that you can't sell for whatever reason; and you have to employ people to do the work. Maybe it's just too expensive. But I don't believe it. If this were the case, there would be no international trade.

Second, maybe the Chinese government steps in to prevent people from running this scam. They could detect that you're spending too many yuan and revoke your business permits and such. I hear the rules involving bringing currency into China are incredibly involved, so maybe this is the case.

Third, the scam is self-limiting. The more it runs, the more it drives down U.S. prices. The lower U.S. prices get, the less attractive the scam is. Likewise, the scam drives prices up in China. That TV you're buying for 500 yuan and selling for 100 usd might cost 600 yuan next month (due to greater demand) and might only bring 75 usd in America (due to greater supply). These prices are much closer to the 10-to-1 exchange rate the Chinese government desired, and they make the scam much less profitable. But even with this explanation, the scam will still run; it just doesn't "go infinite". Undervalued yuan are still being pumped out of banks in exchange for dollars worth half as much.

Fourth, maybe supporting the mandated exchange rate is just a cost of doing business for banks in China. The government requires the banks to do it, at their own expense. In exchange, they're allowed do business in China. I don't see how this would be possible. The price tag is just ridiculous.

Fifth, maybe the Chinese government somehow taps into this cycle so that every time the scam runs, the government ends up with enough in its coffers to pay for all the money it's throwing away. In that case, the higher your tax rates, the more power you have to control exchange rates.

Sixth.... maybe this is what's actually happening. It would explain the ridiculous trade deficit between China and the U.S. But if so, the Chinese central bank is paying for it—right? So in that case, how is the trade deficit a bad thing for the U.S.? Sure, it hurts domestic manufacturing, but it's not like unemployment is out of control over here. And aren't we getting cheap stuff at China's expense?

25 August 2005

Sawzall

Seen on Lambda the Ultimate: Parallel Analysis with Sawzall. Sawzall is a highly parallelizable query language invented at Google. The paper gives several examples of ad hoc queries Google might run internally.

The foolishness of The Wisdom of Crowds

Two competing memes predict what happens when a choice is made by a group of non-geniuses: “the wisdom of crowds”; “design by committee”. Same scenario; two opposite predictions. What gives?

This book review spills the goods. Only some crowds are wise. The author thinks he knows which ones: they are diverse, their members are independent, control is decentralized, and preferences are properly aggregated.

I have a cynical theory about this book. It takes an idea everyone on the right already believes. It repackages the idea for center-left consumption, scrubs it of all math references, adds lots of stories (for interest) and studies (to pass it off as novel), and phrases the thesis such that you can swallow it and retain every political notion you came in with. That is, the thesis has no real consequences. It's unuseful. I guess the book deserves praise for having a thesis at all; cf. the blob of factoids that is Freakonomics.

I have a less cynical thought about this book, too. It reminds me of control systems.

A control system is something like a thermostat. There's some variable it's trying to control (the temperature); and to do that it has sensors to measure that variable (thermocouples) and some kind of machinery that can affect it (your air conditioner). One of its important features is that it deals with random external factors that threaten to screw up the system (it was 110° outside today until noon, when it suddenly became rainy and cold).

Another example: in a robot arm, a control system drives the motors to move the arm to the desired location without overshooting it or taking all day to get there. (This is harder to design than you'd think.)

A typical control system can be described by a system of differential equations. The equations describe not only how the control itself works, but also how the world responds to the things the control can do (for example, how fast your house cools when the air conditioner is on). If the control system is good, the equations converge to a desirable state, in the absence of external disturbances. If the control system is bad, the equations result in ringing (unwanted fluctuations) or don't converge at all (your house freezes over). These equations are a precise mathematical model of the system; you can actually solve them to determine the real-world outcome. A qualitative description of the properties of a good control system might appear on page iv of a nine-hundred-page textbook. The equations tell the real story.

Now the private-sector economy could be seen as a huge system of differential equations. In the absence of external disturbances (weather, new technology, natural resources being exhausted, war, Congress, and life generally), how would it behave? Conservatives think it would converge to a balmy 72°F. Liberals think your house would freeze over.

In comes The Wisdom of Crowds with the brilliant resolution to this hairy* math problem: it depends on four unmeasurable variables, and whether they fall above or below certain unspecified thresholds.

Feh.

*To English majors, hard problems are thorny; to geeks, they're hairy.