sun, 15-jan-2006, 13:29

A couple days ago I mentioned Roy Eisenhardt, who was the President of the Oakland Athletics baseball team from 1981 - 1987. He was the subject of a 1983 Roger Angell Profile in The New Yorker.

When asked if he would make an expensive late-season trade for a star player if he thought it was

necessary to win a pennant that season he replied:

We want to be respectable and competitive, and we want to win our share of everything, including championships. But the way to do that is by being patient and foresighted. You can't just buy it or grab for it---we've already seen too much of that in the game, and its results. (see New York Yankees, 2005---CSS)

If the deal includes the transfer of good young players, it means you're just mortgaging your future for your present. Qualitatively, what's the worth of winning the whole thing versus the worth of being competitive each year? No one wants to accept second place, but unless you actually win the World Series you'll see yourself as having lost in the end.

The article was published in 1983 and shows remarkable foresight on the part of Eisenhardt. Recent research at Baseball Prospectus has attempted to quantify the value of a player to a team based on how many wins they'll add, and what effect that will have on the team's standings.

For example, if paying $27 million dollars for three years of Matt Morris yields an additional five wins over the course of the 2006 season, are those five wins enough to bump you into the playoffs, which is worth a lot of money to a team? For a rebuilding team, this probably isn't worth it, and as Eisenhardt recognized, you'd be selling out your future for the possibility of winning it all. Was it worth it for the Giants, who picked up Morris for 2006 and beyond? Only time will tell, but for the Giants, they are banking on needing only a few more wins in order to make it into post-season. And with Bonds in the last year of his contract, they feel they need to win now. And now, regardless of whether they do win it all or not, it's going to be a long and painful rebuilding process in San Francisco.

tags: baseball 
sun, 15-jan-2006, 13:09

A few hours ago I wrote about a script I wrote that displays your New Yorker DVD reading lists in a convenient format. I just finished writing a similar script (again using Python and the pysqlite python module) which dumps the SQL statements you'd need to restore a reading list to the database. To restore the data to the database you'll also need the command line sqlite3 tool.

Use the script, reading_list_dump.py, to periodically dump your readings lists to a file:

$ ./reading_list_dump.py CSS > css_reading_list.sql

The file you created (css_reading_list.sql in this example) will contain SQL like:

INSERT INTO ReadingListEntry VALUES ( 700, 7, 181437 );
INSERT INTO ReadingListEntry VALUES ( 701, 7, 154899 );
INSERT INTO ReadingLists VALUES ( 7, 'CSS' );

To insert them into the database, close the Viewer program and use the sqlite3 command line program to upload the file:

$ sqlite3 -init css_reading_list.sql ny-sqlite-3.db

One important note: The table that's being updated (ReadingListEntry) has a primary key field that has to be unique in the table. It's the first number in the INSERT statements above (700, 701, etc.). Before running the sqlite3 command, you should make sure that there are no rows in the ReadingListEntry table that match the data you're inserting. If there are, you'll need to edit the dump file and change those numbers until they don't conflict with the existing table.

To find out what the largest value in the ReadingListEntry table is, run the following commands:

$ sqlite3  ny-sqlite-3.db
sqlite3> SELECT ReadingListEntryID FROM ReadingListEntry ORDER BY ReadingListEntryID DESC LIMIT 1;
585

All the values for the first field in the dump file for the ReadingListEntry table should be larger than this number.

tags: books  New Yorker 
sun, 15-jan-2006, 09:34

The New Yorker DVD's allow you to create your own personal reading lists, which are lists of articles that make it easy to access the articles you want to come back to. You can even restrict your searching to your own reading list. The DVD comes with several reading lists already loaded, including one for all the articles mentioned in the hardcover book that comes with the disks.

As it turns out, the database used by the viewer program is a SQLite3 database. It's a public domain database, and the New Yorker hasn't encrypted it so you can view the data in the database with your own custom program, or with a SQLite command line tool available from the SQLite3 web site. You can also extract the data for your reading list, in case something goes wrong with the database and you need to reinstall it.

I wrote a simple Python script, reading_lists.py that allows you to generate a formatted display of all the articles in your reading list. To use it you'll need a standard Python installation, and the pysqlite Python module.

To use is, you'll need to find the database file, which is at C:\Program Files\New Yorker Viewer\ny-sqlite-3.db in a default Windows install. I'm not sure where it installs on a Mac, but the filename is probably the same. Then just run the program specifying the database file, the reading list, and the other options the program offers. The result is a list of the articles complete with abstract and keywords.

Here's the usage statement:

Usage: ./reading_lists.py [-h] [-v] [-c columns] [-d database ] [-r list] [-y year]
     -v          Verbose
     -h          This help page
     -c columns  Number of columns in the output (72 defautl)
     -d database Full path to the database file
     -r list     Name of reading list (escape spaces or quote list)
     -y year     Year cutoff (negative means article before listed year)

and a sample of the output:

------------------------------------------------------------------------
The Financial Page: The Catastrophe Problem. Surowiecki, James
The Talk of the Town
Jan. 10, 2005 (Disk_1_1998_2005)
THE FINANCIAL PAGE about the difficulties presented by natural disasters
and catastrophes for the insurance industry. . . Writer notes that, in
dollar terms, the recent Indian Ocean tsunamis impact was relatively
small. . .the affected countries are relatively poor and the businesses
there are less likely to have insurance. . . This past year was the most
expensive in history for insurers. . . Discusses the actuarial nature of
the insurance business: its about distributing risk over a large group
of people whose behavior is collectively predictable. . . Catastrophes
are not nearly as predictable. The same goes for man-made catastrophes
such as September 11th. Insurers can make forecasts as long as they take
a much longer view. Notes that even after September 11th, the number of
companies that purchased terrorism insurance was relatively small. . .
Keywords: Actuarial Businesses; Hurricanes; September 11th, 2001 (9/11);
Catastrophes; Insurance; Terrorism; Asia; Natural Disasters; Tsunamis;
Business;

Note that if your database did get corrupted, you'd still have to manually recreate your reading list. I'll probably write a second Python script that will generate all the SQL INSERT statements necessary to recreate your reading lists if something went wrong with the database.

tags: books  New Yorker 
wed, 11-jan-2006, 19:59

One of the articles I recently read from the New Yorker DVD's is a profile of former Oakland A's president Roy Eisenhardt by Roger Angell. It was published in the August 15, 1983 issue of the magazine. Eisenhardt was clearly a man before his time:

The delivery systems of baseball are a great concern now---or should be. Television is more important than ever. . . but televised baseball is almost an auto-immune disease. We're consuming ourselves. We're attacking our own system. Baseball can't really be taken in on television, because of our ingrained habits of TV-watching. Anybody who knows the sport understands that the ninth inning is as valid as the first inning---that's why real fans always stay to the end of a game. But we don't watch TV that way. If the other team scores four runs in the first inning we go clicko, or else we flip the dial and watch Burt Reynolds. On TV, the primary emphasis becomes the score and the possibility of the other team's changing it, and so we miss the integrity of the nine innings and those multiples of three---three strikes and three outs.

Baseball is a terrific radio sport, by contrast, because radio feeds our imagination. . . I think baseball has survived all this time because of its place in our imagination---because we've chosen to make the players and the games something larger than they really are. But television has just the opposite effect.

More good stuff tomorrow.

tags: baseball 
wed, 11-jan-2006, 19:39

For Christmas this year I bought myself The Complete New Yorker, which is an 8 DVD collection of all 4,109 issues published between February 1925 and January 2005. It's got a nice interface, is reasonably searchable, and the scans are good enough to read them on screen without strain. Printouts of the pages don't look as nice as the original magazine (or quite as nice as on screen, oddly enough), but it's perfectly acceptable.

Because I run Linux and the proprietary software only runs on Windows and Mac OS/X, I run the software through VMware, which allows me to run a virtual computer with Windows installed.

I spent a few evenings trying to get the DVD's backed up to a hard drive so I wouldn't have to continually swap the physical media to access all the content. I was finally successful using Alcohol 102% to back up the data. Then, using Daemon Tools, I can mount the DVD images as though they were physical media and the New Yorker viewer works.

There's still something not quite right about this, though. Even though Daemon Tools allows you to have as many "drives" connected as you want, the New Yorker viewer will only recognize one of them. That means you can't just connect them all and have the viewer grab whatever content you're looking for. I'm not sure if this was intentional or not, but it's unfortunate. Instead, when you choose content that's on one of the other disks, you have to click the Daemon Tools icon and choose the proper image.

The other quirk is that the order of operations appears to matter. To make it all work, you need to mount one of the DVD images with Daemon Tools, start up the New Yorker viewer, and then choose content that's on a different disk than the one that's mounted. If you try to access content on the currently mounted disk, the reader never opens, and if you try to mount a DVD after you've started the program, it doesn't work either.

One other note -- VMware has the ability to connect disk images to what Windows interprets as physical drives, but this doesn't work with the New Yorker DVD's. It's not completely clear why, since Daemon Tools is basically doing the same thing from within Windows, but I think it's either that VMware isn't completely emulating a DVD drive when using an image (the drive looks more like a CD-ROM drive in Windows), or that the copy protection on the original DVD's isn't emulated.

tags: books  linux  New Yorker 

Meta Photolog Archives