Diversity on the Supreme Court

The nomination of Sonia Sotomayor to the Supreme Court has sparked a debate over diversity on the Supreme Court.

Let’s look at Sotomayor’s life story: went to college, went to law school, became a government employee drawing a paycheck (source). This is remarkably similar to the life story of other senior government officials as well as politicians. No part of her story includes “was at risk of losing capital due to a change in government regulation” or “was at risk of losing job due to downturn in economy.”

Given that a large number of Supreme Court cases involve business disputes, important diversity on the court would be attained by adding a Justice with some experience in business. A lawyer, regardless of race or sex, who had started a dry cleaners and navigated the regulations associated with hiring a couple of employees would have a radically different experience to draw upon than the current Justices.

Consider George McGovern, one of the towering figures of 20th Century American liberalism. After a life in politics, he purchased a hotel. In a 1992 article, “A politician’s dream–a businessman’s nightmare”, he wrote “I also wish that during the years I was in public office I had had this firsthand experience about the difficulties business people face every day. That knowledge would have made me a better U.S. senator and a more understanding presidential contender.”

He added “I also lived with federal, state and local rules that were all passed with the objective of helping employees, protecting the environment, raising tax dollars for schools, protecting our customers from fire hazards, etc. While I never doubted the worthiness of any of these goals, the concept that most often eludes legislators is: `Can we make consumers pay the higher prices for the increased operating costs that accompany public regulation and government reporting requirements with reams of red tape.’ It is a simple concern that is nonetheless often ignored by legislators.”

More recently, McGovern authored a Wall Street Journal Op-Ed opposing the Democratic Congress’s current plan to make it easier for unions to organize workers. His sojourn in the business world changed his perspective to the point where he would no longer fit neatly into either the Republican or Democratic party.

There are plenty of Americans with experience in both law and business. Why shouldn’t we have one of them on the Supreme Court?

Full post, including comments

New Steinhart Aquarium in San Francisco

Out here in San Francisco for Wordcamp 2009, I was excited to visit the Steinhart Aquarium in its new home in Golden Gate Park. The old aquarium was a serviceable Victorian-style institution, with most of the tanks being a standard size. The new aquarium occupies the lowest level of the $500 million (source) California Academy of Sciences building. How does the experience differ from the old version?

Noisier.

Aquariums attract screaming kids. Concrete walls and ceilings reflect screams, as does an acrylic aquarium. Standard acoustical treatment would involve two-inch fiberglass insulation covered in fabric stuck on the walls. As these are standard building supplies, the cost is minimal. Why the architects of this $500 million building didn’t think of sticking some acoustic tiles on the ceiling is hard to, uh, fathom.

How about the rest of the building? Most of it is given over to big photos and signs. Imagine a book or Web site about the environment printed out really big and mounted vertically. Instead of sitting in a chair reading this book or site, you stand around with other tourists reading text and looking at still photos. It is difficult to understand how the new building is more effective educationally than the old (paid-for) one.

Your cost for this experience? $25 per adult.

[The building is supposed to be a showcase for environmentalism, yet nothing could be more destructive to the environment than tearing down a perfectly functional building and replacing it with one the same size. Had they remained in the old building, the California Academy could have completely funded Tesla Motors’s new electric sedan factory and still had $200 million left over to pursue other projects to promote energy conservation.]

[Another way to help understand what it means to spend $500 million on a 400,000 square foot building in the middle of an open field just a couple of miles from an Interstate highway is to look at the recently completed New York Times headquarters in Manhattan. The design is by Renzo Piano, coincidentally the very same architect of the California Academy. It was built in New York City, presumably requiring payoffs to unions, politicians, and the Mafia (NYC has for decades been the most expensive place in the U.S. for doing construction and the logistics simply to get materials to the site are daunting). The Times building is 52 stories high and contains more than 1.5 million square feet of space. It cost $600 million.]

Full post, including comments

To improve airline safety, give all pilots the same schedule

Friends have asked about the crash of Colgan 3407, stalled by a very junior captain and a moderately junior first officer. How could two experienced pilots have made the kind of mistake that befalls rusty Private pilots in a little four-seater? Evidence suggests that both pilots were fatigued and one was sick. The captain had failed quite a few check rides, but the first officer had 1600 hours before she joined Colgan and held a current flight instructor certificate. She probably built up most of those 1600 hours saving students from their mistakes. Sick and tired, evidence suggests that she could not save the captain from his mistakes.

Politicians have focussed on the low pay for regional airline pilots. I think that AIG, Wall Street, and our public school systems demonstrate that paying employees more does not necessarily generate higher performance. Working for $19,000 per year and living with mom doesn’t sound very glamorous, but there are plenty of people who want to do it. Paying Rebecca Shaw more would not have saved the airplane and its passengers.

What could have saved the airplane? Well rested pilots.

Most airlines have a seniority-based system for everything, including, critically, scheduling. A senior pilot at a major airline might be able to arrange his schedule so that he need only work 8 or 10 days per month. He will be able to choose his home base so that it is close to his actual house. The senior pilot will have a short commute and 20-22 days per month of rest.

The junior pilot, by contrast, gets the trips and the schedule that the senior pilots don’t want. The result may be 22 days month of 16-hour days (measured not by flight time but by hotel room to hotel room). A typical 16-hour day may include a 6-hour stop at an airport where the airline does not have a base and therefore there will be nowhere for the pilot to rest. He or she will be sitting near a gate, in uniform, reading a book, trying to shut out the noise of thousands of passengers walking by and hundreds of public address announcements.

Note that the least experienced pilots at an airline are getting the least rest. The most experienced crews are getting the most rest. I.e., the crews that really need to be sharp to do the job are the ones who are flying while tired.

The seniority system for pay and schedule increases commuting time. Suppose that an experienced Boeing 737 captain lives in New York and flies for an airline with a New York base. His wife gets transferred to Los Angeles and he follows her. His airline doesn’t have a base on the west coast. You’d think that he would quit and join an LA-based airline flying Boeing 737s, right? Doing so would cost him a 70 percent cut in pay and a 50 percent increase in hours worked. Having lost all of his seniority, he would start as the most junior first officer at his new employer. It might take him 15 years to work his way back up to captain. What will he do? He can fly free on any airline, so he’ll keep his job in New York and start every 4-day trip with a 6-hour flight from Los Angeles, possibly followed by a night in a “crash pad” (2BR apartment shared with 10 other pilots).

Does it have to be done this way? No. NetJets and many other corporate jet operators have the same schedule for all of their pilots. In the case of NetJets, it is 7 days on and 7 days off.

A few simple ideas for improving airline safety and giving the future Rebecca Shaws a chance to save the passengers:

  • require that airlines come up with a scheduling system that gives an equal amount of work and rest to all pilots (the average amount of work done by pilots would not change, so this should not cost the airlines anything extra)
  • require that airports served by commercial airlines build crew rest lounges that pilots from any airline can use for naps, etc. (airports collect a hefty tax on every passenger who goes through, so this should not break their budgets)
  • come up with a procedure whereby pilots can move from airline to airline without having to start over at the bottom of the pay scale (there will no longer be a “schedule scale” so we don’t have to worry about that), in order to discourage long-distance commuting

[Note that the typical tiny airport in the U.S., which the average person would call an “airstrip”, and which may not have any full-time staff, will have a comfortable lounge in which visiting pilots can rest. There will be sofas. There may be recliner chairs. Some of these small airports for private planes even have small bedrooms for naps. How come the guy flying a four-seat prop plane has a better place to rest than the pilot of a 150-passenger jet?]

    Full post, including comments

    Need examples of great Web essays and great Weblog entries

    I’m giving a talk at Wordcamp 2009, May 30 in San Francisco. A portion of the talk is based on a new article that I’ve drafted, “How the Web and the Weblog have changed Writing”. For this article and talk I need examples of great 20-30 page essays that are published on the Web but not in print. I also need examples of 1-4 paragraph Weblog postings that show the power of the medium. I could illustrate the article exclusively with my owns writings, but upon a careful review of everything that I’ve written in the last 16 years it seems that I haven’t written anything great.

    Suggestions would be welcome either via email to philg@mit.edu or in the comments section below.

    Full post, including comments

    Ruby on Rails and the importance of being stupid

    A tale of two servers…

    Server #1: I attended a presentation by a guy with a background in law and business, what we programmers commonly call “an idiot”. He had set out to build a site where people could type in the books, dvds, and video games that they owned and were willing to swap with others. Because he didn’t know anything about programming, he stupidly listened to Microsoft and did whatever they told him to do. He ended up with a SQL Server machine equipped with 64 GB of RAM and a handful of front-end machines running ASP.NET pages that he and few other mediocrities cobbled together as best they could. The site, swaptree.com, handles its current membership of more than 400,000 users (growing rapidly) without difficulty. A typical query looks like “In exchange for this copy of Harry Potter, what are the 400,000 other users willing to trade? And then for each of those things, what else might some third user (chosen from the 400,000) give in a three-way trade.” This kind of query is done many times a second and may return more than 20,000 rows.

    Server #2: A non-technical friend hired an MIT-educated software engineer with 20 years of experience to build an innovative shopping site, presenting Amazon-style pages with thumbnails and product descriptions. Let’s call my friend’s site mitgenius.com. The programmer, being way smarter than the swaptree idiot, decided to use Ruby on Rails, the latest and greatest Web development tool. As only a fool would use obsolete systems such as SQL Server or Oracle, our brilliant programmer chose MySQL. What about hosting? A moron might have said “this is a simple site just crawling its way out of prototype stage; I’ll buy a server from Dell and park it in my basement with a Verizon FiOS line going out.” An MIT genius, though, would immediately recognize the lack of scalability and reliability inherent in this approach.

    How do you get scale and reliability? Start by virtualizing everything. The database server should be a virtual “slice” of a physical machine, without direct access to memory or disk, the two resources that dumb old database administrators thought that a database management system needed. Ruby and Rails should run in some virtual “slices” too, restricted maybe to 500 MB or 800 MB of RAM. More users? Add some more slices! The cost for all of this hosting wizardry at an expert Ruby on Rails shop? $1100 per month.

    For the last six months, my friend and his programmer have been trying to figure out why their site is so slow. It could take literally 5 minutes to load a user page. Updates to the database were proceeding at one every several seconds. Was the site heavily loaded? About one user every 10 minutes.

    I began emailing the sysadmins of the slices. How big was the MySQL database? How big were the thumbnail images? It turned out that the database was about 2.5 GB and the thumbnails and other stuff on disk worked out to 10 GB. The servers were thrashing constantly and every database request went to disk. I asked “How could this ever have worked?” The database “slice” had only 5 GB of RAM. It was shared with a bunch of other sites, all of which were more popular than mitgenius.com. Presumably the database cache would be populated with pages from those other sites’ tables because they were more frequently accessed.

    How could a “slice” with 800 MB of RAM run out of memory and start swapping when all it was trying to do was run an HTTP server and a scripting language interpreter? Only a dinosaur would use SQL as a query language. Much better to pull entire tables into Ruby, the most beautiful computer language ever designed, and filter down to the desired rows using Ruby and its “ActiveRecord” facility.

    Not helping matters was the fact that the sysadmins found some public pages that went into MySQL 1500 times with 1500 separate queries (instead of one query returning 1500 rows).

    In reviewing email traffic, I noticed much discussion of “mongrels” being restarted. I never did figure out what those were for.

    As the MIT-trained software engineer had never produced any design documentation, I could not criticize his system design. However, I suggested naively that a site with 12.5 GB of data required to produce customer pages would need a server with at least 12.5 GB of RAM ($500 retail for the DIMMs?). In the event that different customers wanted to look at different categories of products, it would not be sufficient to have clever indices or optimized queries. Every time the server needed to go to disk it was going to be 100,000 times slower than pulling data from RAM.

    My Caveman Oracle/Lisp programmer solution: 2U Dell server with 32 GB of RAM and two disk drives mirrored. No virtualization. MySQL and Ruby on Rails running as simultaneous processes in the same Linux. Configure the system with no swap file so that it will use all of its spare RAM as file system cache (we tore our hair out at photo.net trying to figure out why a Linux machine with 12 GB of RAM, bought specifically to serve JPEGs, would only use about 1/3rd for file system cache; it stumped all of the smartest sysadmins and the answer turned out to be removing the swap file). Park at local ISP and require that the programmer at least document enough of the system that the ISP’s sysadmin can install it. If usage grows to massive levels, add some front-end machines and migrate the Ruby on Rails processes to those.

    What am I missing? To my inexperienced untrained-in-the-ways-of-Ruby mind, it would seem that enough RAM to hold the required data is more important than a “mongrel”. Can it be that simple to rescue my friend’s site?

    [August 2009 update: The site has been running for a couple of months on its own cheapo Dell pizza box server with 16 GB of RAM. The performance problems that the Ruby on Rails experts had been chasing for months disappeared and the site is now responsive.]

    [March 2010 update: My friend is now in discussions with some large companies interested in using his technology or service. Andrew Grumet and I published “Software Design Review” as a result of this experience.]

    Full post, including comments

    Good used car in Washington, D.C.?

    A friend in Bethesda, Maryland (Washington, D.C. suburb) needs to buy a car for her nanny. Mission: transport 2-year-old kid and sometimes big dog for a total of 7500 miles per year. Being fashionable is not important, though the car should be reasonably reliable and safe.

    I thought that a 2008 Chevrolet Malibu from a rental car agency would be a good choice. Or maybe a Chrysler minivan with 50,000 miles on it.

    Ideas? Where to get a good value used car in the DC/Maryland area?

    Full post, including comments

    Limits to government power

    In Alan Greenspan’s autobiography, he says that the Fed could not control interest rates; if the Fed had insisted on a high rate of interest for dollars, banks could have borrowed dollars at lower rates from Chinese holders of dollars.

    In today’s New York Times, “Why Markets, Not the Treasury, Determine Bank Capital”, tries to explain why the government’s scheme for bolstering bank capital turned into higher dividends for shareholders, acquisitions (e.g., Bank of America buying Merrill and Countrywide), executive bonuses, and just about anything other than more bank capital.

    Looking at my economic recovery plan it seems that it still makes sense in light of information that the government is not all-powerful. All of the changes that I propose are to things that the government does control or run, e.g., tax rates, rules for corporate governance, schools, public employee unions, immigration decisions.

    Full post, including comments