We woke up early today, and with my parents and our guest Bang-Shen, set off for Boston. It was snowing in Westport, the first snow of the year, but in Boston there was only a dreary mist. Undeterred, we started walking toward Harvard, and I put on my tour guide hat (figuratively).

After wandering through Harvard Yard, our first target was the Harvard Museum of Natural History. I’d never been, but I’d heard of the museum, and especially of its famous glass flowers. We were unexpectedly admitted for free, apparently not because I am a Harvard student, but because I am a resident of Massachusetts and it was before noon.

The glass flowers are amazing. They were produced on a commission from the Harvard Department of Botany by a father and son team in Germany from 1895 to 1930. It would be too much to say that they have any kind of artistic beauty. Instead, the flowers are astonishing because they are absolutely indistinguishable from a freshly cut branch of the plants they seek to imitate. The plants were designed for science, not art, so the species were not selected for their beauty. Many common plants, even weeds, are present, with leaves, stalks, and roots all represented perfectly. I can only say with certainty that they are glass because of the few that have cracked and been repaired.

The rest of the museum is also surprisingly good. The collection is not extensive, but it is chosen well. Anyone will flinch when faced with a complete skeleton of an adult Pliosaur, halfway between a snapping turtle and a crocodile but forty feet long.

We took the T to Chinatown for lunch, and then back to Kendall for a quick tour of MIT. Now the others are driving home to Westport, and I’m where I need to be in Boston.

That worked fairly well.


The plan was to get a ride back to Boston on Sunday with my cousin Jake. That made sense, but nobody thought to ask Jake… and it turns out his car was full. The fallback plan was Amtrak, but by that time every train to Boston on Sunday was booked, and so I found myself in the wrong state without a car.

After much discussion, we came to the conclusion that tomorrow we will make a day trip to Boston. It will serve the dual purposes of getting me home and giving my parents’ chinese exchange teacher guest a chance to see Boston.


Today was the same as every Thanksgiving since I was 4 years old: a great big meal at my grandparents’ house with cousins and other family and friends.  As for the past few years, This year I had my brother Jeff, whom I don’t get to see often enough, so it was especially nice.  I’m staying at Captain Jack’s Inn, as I have for the past few years.  In fact, this might even be the second post I’ve written on the subject from an OLPC XO, since I brought two along last year.  After monopolizing the party for two years running, maybe I’ll leave ‘em home next time.

For the past five years or more, our annual tradition has been to try to remember the password to the wireless network, which is only used for this one day every year.  Usually we can’t remember and have to reset the access point.  Last year, after a parade of faulty routers and endless signal strength problems, we finally gave up and had a new cable run so that the house’s main desktop could have a wired ethernet connection, and the wireless network could be discarded entirely.

That worked, until this thanksgiving, when we realized that this solution left us without a connection for anybody else’s devices, which now includes a profusion of iPhones, laptops, blackberries, and of course a few XOs.  My brother solved the problem using Apple’s incredibly streamlined network-sharing system, which provided a beautiful three-click GUI interface to transform the iMac into a secure wireless AP, router and NAT.  That’s pretty much what I did for my linux router machine, but it took days of compiling kernels and fighting with OpenAPd.  The NetworkManager folks have a lot to learn from Apple.

These are contentious times, and we had at least as many opinionated people as usual, so we had quite a few good discussions over the course of the evening. One of them, and a very interesting one, was about intellectual property.  The family business is shoes, which means fashion design, which means generating original designs and then fighting with copycats.  My grandfather therfore has an understandable disdain for anyone who copies the designs of others without permission.  For this crowd, I’m going to need a new approach if I’m going to have any success arguing against government enforcement of intellectual property rules.

I did sell two XOs, to two avid bridge players, on the condition that I get the American Championship Bridge League’s scoring software running on them, so that they can be used as table-side scoring computers.  I’ve already got it tested under Wine, but there are a few details like ¿how do you print? and ¿how do you copy files to a usb stick?  Hopefully that won’t be too hard to work out.

Server Swap

Right under your noses; indeed, hopefully without anyone noticing at all, I have transferred this site to possibly its third or fourth home.  After about two years on my parents’ desktop machine (a gift from my cousin Jake), it now lives on my apartment server machine (a gift from my former roommate Simon), which, as previously mentioned, is also our wireless access point, DVD player, TV, public terminal, and various other such things.

The move was precipitated by my friend Ivan, who helpfully noted that the version of the server software running on my parents’ machine was dangerously out of date.

There is some ickiness involving the problem of comment spam.  Over the past two years I’ve received over 9000 spam comments, and accrued some fairly elaborate systems for dealing with it.  Those aren’t in place yet, so comments may not work quite right… or they may work perfectly.  I recommend you not worry about it.

In other news, I forgot my laptop power cord at work, so I have performed this whole upgrade using only an OLPC XO (and the server itself).  The battery life with Chris’s power management is really impressive.

Sugarcamp musings

Mel Chua, at the end of the Sugarcamp conference, suggested that we write down our thoughts about the week. She meant for us to make a list of positive and negative points, but I misunderstood, and so wrote the following instead:

With this crowd, it’s not always easy to tell the difference between a party and a conference. Sugarcamp had lots of hardware, lively discussion, laptops, projectors, pizza, beer, whiteboards full of Venn diagrams and grids, visitors from far coasts and countries… all of which is indeterminate. I guess that’s what makes it a camp.

Not very much code was written, though some was, and not too many concrete decisions were made, though a few were. The most valuable steps are more like clay not yet fired, commitments that have taken shape but are still subject to the impressions of more hands before they are fixed.

I caught only a slice of the camp. I saw a great deal of what conferences are famous for: the resolution, smoothly or abruptly, of the tensions that accumulate when we communicate from a distance. I also some of the unfortunate converse: people whose incompatibilities can be ignored in text but are prohibitive in person.

We drew in new people and made painstakingly detailed plans on how to draw in more. If we are lucky, work hard, and are half as smart as we think we are, the next Sugarcamp will be far larger.

Maybe then we can get something catered other than pizza.


In the fall, in the countryside, one can judge the arrival of winter by the first frost. One morning the grass will be sparkling white instead of green, just for a few hours, and we will say “winter’s coming.”

In the city there is no grass, so no frost. Instead, on my daily ride to work, I passed a frozen stream running along the curb. Running water has a certain honesty; you can always tell where it’s coming from. Ice is more mysterious.

This has been a bit of a crazy week, mostly because of the Sugar Labs conference (an OLPC spinoff focusing on the software side). I’ve been spending a lot of time there having fun, stressful, exhausting arguments, but I’m also working hard at work.

It’s been 10 years since I wrote my first C program, but only this week have I finally grasped the memory model and type system. I’m still a novice, but for the first time I can dereference and cast a void** pointer-to-a-pointer-to-unknown with total confidence. I just implemented a motion-tracking algorithm that juggles pointers to avoid ever copying memory, a sort of miniature circular buffer. C can be a lot of fun.


My roommate can’t access Gmail from his laptop running Vista over our wireless network. Everyone else on this network can access Gmail, he can access gmail if he steals wireless from a neighbor, and he can access every other website over our network. The only non-working combination is his laptop, Gmail, and our network. Also, it’s only the advanced, AJAXy version of Gmail with built-in chat and such.

Today, after the neighbors finally locked down their networks, we finally figured out a workaround: Gmail works when he’s running a VPN client that routes all traffic through MIT. I have no idea why this should help. Any ideas are welcome.

Unfortunately, about ten minutes after we figured this out, the net connection stopped working for all of us. Working directly on the access point machine, I found that I was getting about 80% packet loss when pinging the DNS servers. The Digital Cable TV was unaffected, indicating that the coax connection was intact. After five minutes it spontaneously cleared up, and then went out again an hour later. I called Comcast to have them reset the modem, which worked, but left the modem hung in a mysterious state, unable to acquire an IP address for us. After half an hour on the phone with customer service I scheduled an appointment for a technician to come… and then it spontaneously acquired an address and started working again.

So for now it’s working… but you never know for sure.

Sold Out

Not much to report. I almost went to see the new Bond movie, but my friends had bought tickets to a show that had since sold out.

Instead I stayed in lab and wrote code for my data acquisition program. Then I came home and wrote some more code for a fun but slightly mind-bending datastructure. Actually, in both cases I was doing the same thing, in some sense, so I can say that for the past 9 hours I’ve been trying to add new abstractions in preparation for future features.

NI in C

I got my system working using the National Instruments C API. As a result, I was able to grab 1000 records, each consisting of 20000 samples, to disk, in 10 seconds, for an average rate of 2 million samples per second. Each record corresponds to the signal received by a 5 MHz ultrasound transducer, and each sample is 16 bits wide. The effect is exactly the same as when one records from a microphone through a computer sound card, but 100 times faster. In fact, the instantaneous sample rate is 100 MS/s, which is more like 2500 times faster than a standard sound card.

It occurs to me that if I slowed down my data by a factor of 10000, each record would be eight seconds long and in the audible frequency. Maybe I’ll try that tomorrow. I suspect it will sound like a sonar ping in the movies, and that’s essentially what it is.

EDIT: Did I say 8? I meant 2. You can hear the sound if you like. It doesn’t sound at all like I was expecting. The transducer I’m using is deliberately wideband, but it wasn’t until I listened to the recording that I realized just how wide. If it were a narrowband transducer, it would sound like a bell, but instead it sounds like a wood block or a gunshot.

American Cars

My mom asked me to write a post on what to do about the fact that GM is now bankrupt. Oh, you might not have heard about that. According to the Detroit Free Press, the Wall Street Journal, and (my favorite source) The Truth About Cars, General Motors is running out of operating capital and will not be able to continue operating factories and paying workers through the end of this year. If their sales went up dramatically or they could get big loans then this would not be a problem, but nobody expects a jump in new car sales and nobody wants to lend money to GM.

Without intervention, this means that GM will be forced to file Chapter 11 bankruptcy, in which case the company would be placed under court supervision. A judge (and a team of other government people) would then be responsible for figuring out which creditors get paid back with what, which contracts can be modified, and how the company should be structured.

It’s maybe worth mentioning what the problem is. All the automakers have seen a sharp fall in sales during the last three months, but most are expected to survive without incident. GM, however, is in a particularly bad position for three reasons: their vehicles are not competitive, their labor contracts are very expensive, and they have way too many dealers.

GM has spent the past 15 years focused on expensive, inefficient “SUVs” (really passenger trucks). When gas prices were low, this was a great strategy, with enormous per-vehicle profits achieved by selling Suburbans to suburbans on credit. Unfortunately, GM didn’t invest this money in designs for smaller cars, which were not profitable. As gas prices have risen over the past few years, GM has found themselves with an enormous variety of great trucks, but very few competitive cars. GM does make a few cars, like the Chevy Malibu and Cadillac CTS, that are as good as their competition, but the great majority are too large, too heavy, and too inefficient, as if they were made by a truck company. GM’s subcompact that is perfect for the economic moment is the Saturn Astra, which is imported from Europe, and is thus so expensive that it can hardly be sold at a profit. Their other small cars like the Chevy Aveo have received so little attention that they are distinctly subpar, next to foreign competitors like the Honda Fit, and Scion xD.

A big part of GM’s problem is that they cannot produce small cars profitably (or at least they don’t think they can). Small cars sell for lower prices, and require less material, but need a similar amount of labor to build, and GM’s labor costs are very high. This may seem an inevitable result of producing cars in the United States instead of in a third-world country, but it’s important to remember that the Toyota Prius, BMW X5, Honda Civic, Nissan Altima, and many other “foreign” cars are actually produced in the United States. The principle difference between these plants and GM’s is that they do not pay their employees quite so well. In particular, GM in the 1970s and 1980s guaranteed their workers excellent pension plans, but did not fund those plans immediately. As a result, they are now paying for top-notch health insurance for thousands of retired employees and their families. These costs are called “legacy costs”, and in 2005 they added $1600 to the cost of every GM vehicle. GM’s employees are still virtually all union members, and GM’s union contracts prevent them from cutting wages or benefits, even if it drives the company into bankruptcy.

The final issue is the dealer network. Toyota has about 1200 dealers in the US. Chevrolet alone has over 4000, and GM also has the Cadillac, Buick, Pontiac, GMC, Saab, and Hummer brands, with thousands more dealers. Toyota sells more vehicles than GM, through a fraction of the number of dealerships. This means each dealership has to be supported by selling a much lower volume of cars, so there must be a wider profit margin on each vehicle, which again makes GM less competitive. Franchise laws prevent GM from simply closing these dealerships or otherwise deliberately putting them out of business.

Without intervention, GM will fall into Chapter 11 bankruptcy within the next month or so. Chapter 11 would place the company under the supervision of a judge, together with a large team of government bureaucrats, who will be given responsibility for determining which of GM’s contracts and obligations can be honored and which must be modified. The bankruptcy proceedings would provide an opportunity to solve these fundamental problems by replacing the company’s management and renegotiating contracts with unions, retirees, creditors, and dealerships. Thousands of dealerships would be closed, wages would fall, benefits would be restricted, and brands like GMC might cease to exist… but the company could survive, and hundreds of thousands of workers would keep their jobs. This is the plan that The Truth About Cars has largely endorsed. Moreover, if the government wishes to “bail out” GM to ensure that as many people as possible remain employed, then the logical time to do this is after bankruptcy proceedings have stripped the company of its impossible obligations and bad managers.

This sort of reorganization is not uncommon in bankruptcy proceedings, but it’s hard to do well. It’s even harder for a company as deeply in debt as GM; many creditors will surely be calling for the company to be shut down and its assets liquidated. Bankruptcy has also been seen as a major public relations problem for GM. Nobody wants to buy cars from a bankrupt company, so it’s expected that sale prices on existing GM vehicles would fall way below cost, creating huge downward pressure on the rest of the automobile market and damaging Ford and Chrysler’s similarly iffy finances.

To avoid bankruptcy, GM leaders met this week with Nancy Pelosi in search of a bailout. If Congress authorizes $50 billion in low-interest loans for GM, it might provide them with enough cash to continue operations for another year or two, and this is what they were asking for. The fundamental problem here is: why should we expect them to do any better next year than they did last year? They’ve been losing billions of dollars a year for a long time, and it’s hard to see why the trend should break now. Without addressing the three critical problems, GM is never going to become profitable. That doesn’t mean that this bailout won’t happen, though, since the Democrats want to keep winning elections in Michigan. It just means that it’ll be more taxpayer money being handed out to incompetent GM leadership (their CEO, by the way, is paid about $40k a day) with little chance for repayment.

I don’t have a lot of insight into this problem, but it seems to me that, given the inevitability of a GM bankruptcy, if the government is intent on preventing the resultant bad PR, they should create a special status for GM. Call it the Federal Program to Ensure Success. GM, recognizing its imminent Chapter 11 status, would instead apply for admission to the FPES, which would accept them. The FPES would create the moral equivalent of a bankruptcy court, coupled with the understanding that the government will provide additional credit as necessary to ensure that the resulting reorganized company is capable of meeting certain requirements. With a Federal guarantee that warranties would continue to be honored and parts would continue to be sold, prices for GM products should not fall so far. The government must ensure that the leadership of GM is replaced, and their contracts adjusted for minimal compensation, to ensure that the process does not create a moral hazard for future corporate bankruptcies.

Barack Obama has made carefully vague statements about the automakers, stating that they are “critical”, but not indicating which approach he would take to maintain them. Bush has been very nearly silent. We shall see.

EDIT: Hilarious Businessweek article from 2005. Choice quotes:

Wagoner is pegging his turnaround largely to a rebound in large pickups and SUVs. That’s highly problematic. GM should get some pop just from replacing its aging truck lineup, which is six years old and staggering as buyers turn to smaller SUVs and newer vehicles such as Toyota’s Sequoia full-sized SUV and Ford Motor Co.’s (F ) rejuvenated F-150 pickup line. GM’s Kowaleski says: “Even if those markets don’t grow, there is a lot of opportunity for volume and profit.” But first-quarter sales of full-size SUVs nosedived 21.5% from a year earlier, according to Autodata Inc., thanks to rising gas prices and competition from crossovers,

Merrill analyst John A. Casesa estimates GM can last five years before it hits a liquidity crisis. “We believe that 25% market share is the threshold,” Casesa says. “If GM falls below that, things get ugly fast.” But that assumes overall U.S. car sales remain at their current high level. If rising interest rates, high gas prices, or other factors hammer the economy, the picture darkens further. At 15.4 million vehicles and a market share of 24%, GM would burn through $3.6 billion of cash annually, says Merrill; a 20% share would leak a catastrophic $5.7 billion. “The next blow comes if there is a recession,” says longtime industry analyst Maryann N. Keller. “We just got through an [economic] expansion, and the balance sheet is in worse shape than it was before.”

In other words, this is not exactly a surprise.