Friday, August 13, 2004

The Curse and the Pythagorean Rule

After staring at the first two lines of the AL East standings every day for the past few months, and after writing the last post, I just had to do this. With a little help from the Baseball Archive database, I came up with the following tables:

New York Yankees:

Year   W    L   Pct.   RS   RA  Pythg%  PredtW Excess

where "Pythg%" is the winning percentage predicted by the Pythagorean rule, "PredtW" is the predicted number of wins for the number of games played, and "Excess" is the number of actual wins above the Pythagorean prediction. The Yankees have obviously done very well over the past years, but except for 1997 they've always been a little bit "lucky". Which brings up the obvious question:

Boston Red Sox:

Year   W    L   Pct.   RS   RA  Pythg%  PredtW Excess

That's right, the Sox have consistently won fewer games than they should have according to the Pythagorean rule.Curse, conspiracy, fate, law of averages? You make the call.

As for me (a Royals fan who remembers 1976, 1977, and 1978, and whose greatest joy was 1980):

Yankees Delenda Est

Note added in proof: To be fair, over the lifetime of the franchises, the Red Sox have only lost -0.09 games/season more than they should have according to the rule, and the Yankees are at -0.21 games/season. Things eventually even out, which I'm sure will be a great comfort the Red Sox fans in 2107 or so.

Thursday, August 12, 2004

Running out of time

Typing SoX in the last post made me remember to discuss an anomoly that's been going on for most of the year. If you go to the standings for the AL East, then today (12 August 2004) you'll see the lines:

Team        W  L  Pct GB  RS  RA
NY Yankees 72 41 .637  - 625 551
Boston     63 50 .558  9 643 542

That's right, the Red Sox have scored more runs than the Yankees and given up less, in the same number of games. However, the Yanks are 9 games up. If you use the Pythagorean rule, which is probably the most holy writ in Sabermetrics, over 113 games we should have

Team        W  L  Pct GB
Boston     66 47 .584  -
NY Yankees 64 49 .566  2

where I rounded off to the nearest integer. You see that Boston is slightly underperforming, while the Yankees are, alas, overperforming by 8 games or so. This isn't out of line. Someplace, Bill James says that the Pythagorean rule is accurate to +/- 10 games over a season. So the numbers aren't all that out of wack.

Red Sox fans are, however, allowed to consider this another cruel twist of fate.

Without Wikipedia I'd have nothing to say.

Get Firefox to "play" WMV files

Took a little bit of doing to get that last link to play WAV files under Firefox. I went to

Edit > Preferences >Downloads > Plug-ins

and found that WAV files were to be handled by a plugin. (Probably Plugger, but I'm not sure.) Whatever plugin it was, it didn't work so I disabled the okygub, and then tried the speach program again. When I hit the link, I got a box asking me what I wanted to do with the file. The default program was xine. I decided I wanted something that actually shut off when requested, so I chose /usr/bin/play, which is part of the SoX package.

So far, this works perfectly.

Unfortunately, It Can't Say "Jaffa! Kree!" With Any Conviction

but it does get your computer to talk:

ATT Interactive Multi-Lingual Demo

Sunday, August 08, 2004

Firefox Update

Mozilla Firefox is out with version 0.9.3 for Linux and Windows, so I figured I'd try it out here first. These are notes to remind me where I put all the plugins. Everyone else can turn away. Nothing to see here, really.

% su -
$ cd /home/local
# Move the old file out of the way (delete later)
$ mv firefox firefox_91
# Untar source file in appropriate location:
$ tar xvzf /home/local/src/firefox-0.9.3-i686-linux-gtk2+xft.tar.gz
# Fix plugins:
$ ln -s /usr/lib/flash-plugin/flashplayer.xpt
$ ln -s /usr/lib/flash-plugin/
$ ln -s /home/local/share/j2sdk1.4.2/jre/plugin/i386/mozilla/
$ ln -s /usr/local/RealPlayer/mozilla/
$ ln -s /usr/local/RealPlayer/mozilla/nphelix.xpt
$ ln ../../firefox_91/plugins/ .
$ ^D
# Make sure plugins get updated (they should, but who knows):
% rm ~/.mozilla/pluginreg.dat
% firefox &

So far things work fine, except that I don't know what the difference is between 0.9.1 (or 0.9.2 for Windows) and 0.9.3.

A bit later: Apparently this is a security update to fix several bugs which showed up in 0.9.1/2. "Users are strongly encouraged to upgrade." So sayeth Mozilla.

Saturday, August 07, 2004

Crying "Cockles and Mussels, Alive, Alive Oh"

OK, this is really wierd. Apparently there are Scot and Chinese cockle-picking gangs, and occasionally they get into fights. Which start when their boats collide:

Cockle pickers rescued after gangs clash at disaster spot

Making It Never Exist

Part two of that Slashdot article I mentioned before:

For some reason, this happens most frequently when I go to, but it happens on other sites, too. I click on an article, and get the message

Waiting for

and then the web page hangs for awhile.

What's happening is that the Post is going to and waiting for advertisements to load up. Of course, the net doesn't just go to doubleclick, it goes elsewhere as well. And many of those ``elsewheres'' are nothing but annoying ads.

Wouldn't it be great to get rid of those ads? OK, we can use something like Adblock, and I recommend that, but wouldn't it be wonderful to make your computer believe that places like doubleclick never existed? (And, incidentally, decrease worries about your privacy.) There is a way.

Let's go back to the early days of the Internet. There was nothing like the current Domain Name Service (DNS). Oh, each web site had an IP address, but there were no central directories to tell you which IP address belonged to Google (not that Google existed back then).

So how would you have found Google? In order to find things on the Internet, each computer had a file called /etc/hosts. (OK, each Unix-like computer had such a file. I have no idea what other OS called it.) In the /etc/hosts file was a line like:

which told your computer the IP address of Google. Of course, this file had to be upgraded periodically by downloading a new file from somewhere, and eventually it got so big that the whole thing had to be scrapped and DNS was adopted. But, the /etc/hosts file still exists, and it's read before your computer goes out to your chosen name server!

This is really quite useful. If you use Google a lot, for example, adding the line

to /etc/hosts saves you from having go to the DNS every time you want to do a search. And there's another use:

Near the top of /etc/hosts is a line like      localhost.localdomain localhost

This tells your computer where your local computer lives on your local network (even if you don't have a local network). If you try to go to localhost from your web browser, you'll get a message like

The connection was refused when attempting to contact localhost

(Unless you are running your own web server, in which case you'll get your home page.) In this case, localhost and localhost.localdomain function as aliases for the address Any request to go to localhost takes you to, and does whatever you tell it to.

Now suppose the webpages you visit regularly connect you to a scuzzy site we'll call You're tired of these ads and never want to see them again. What to do? Remember that /etc/hosts is read first, before the request goes out to the DNS. So add a line

to /etc/hosts. Now, when that page you are interested in asks send some advertisements, your computer looks up the address, finds that it is, and does whatever you've set it up to do. If you don't run your own web server, it does nothing. It's as if that site never existed.

So, what you need is a list of really annoying sites that should be banned from your computer. Of course, this being the Internet, there are many such lists. The one I'm using is Mike Skallas' Ad Blocking Hosts file. Basically, you add it to /etc/hosts. And, frabjous day, there are instructions for doing the same thing in Windows 2000 and XP.

And, of course, once you know the trick, you can add your own annoying sites to the list. Parents can add sites that they want to keep their children out of, e.g.

Hopefully no one will add

The Effects of Spyware

One article on Slashdot (Analysis of Spyware) yields two entries here. First, the title article:

I've mentioned the program Ad-Aware, which locates and helps you remove spyware from your system. OK, what happens if you don't use a program like this, and accidentally/on purpose download a program that results in spyware being loaded onto your computer?

The folks at SANS decided to find out, so they intentionally infected a virtual PC with spyware (look for the heading Follow the Bouncing Malware - Part I and then tracked the results. You can read all about it at the link above, but, basically, it rewrote the Windows registry, changed IE's home page, changed the default search engine, and dropped various programs onto the computer. To see what happens, we'll have to wait for Part II.

Tuesday, August 03, 2004

RealPlayer 10 Setup

Installed the release version of RealPlayer 10 for Linux. This supersedes the beta version I talked about earlier.

When you download, don't let the name RealPlayer10GOLD scare you, they aren't charging for this player, unlike previous Gold versions.

Had some difficulty getting Plugger to let go of the RealPlayer plugins for Firefox. To do that,

  1. If you set up the symbolic links to the plugins as in the beta version post then they still point to the right location. If you used hard links, then you'll have to delete them and relink.
  2. Edit the file ~/.mozilla/plugins/pluggerrc, removing or commenting out all calls to realplayer (whether all is a good idea remains to be seen).
  3. Delete the file ~/.mozilla/pluginreg.dat. Mozilla/Firefox reads this to find plugins. It only consults the plugins themselves if this file is gone
  4. Restart Firefox

So far everything works. I can even watch CBS News videos, which I couldn't do before, probably because I didn't have the plugins set up correctly.

Monday, August 02, 2004

More Power to the Shields, Mr. Scott

The Internet Tourbus (Hop On the Internet Tourbus!) has another good article on computer security, this time firewalls. In particular, they mention the site Gibson Research Corporation, which runs a service called SHIELDS UP!. This probes your computer, DSL router, hardware/software firewall, etc., to see how secure your installation is against hackers. I tried it, and it taught me a few things about security -- specifically, I found that my router was replying to pings, and figured out how to shut that off.

A word of warning -- as they say, these people are going to probe your computer. If you don't want them doing that, or if it's your employer's computer, not yours, and you don't have permission, then don't go through with the test. And, even though I've used it, I'm not going to say that this is totally secure, or even a Good Idea. But it's something you should consider if you are worried that your computer could be hacked. (If you run a business and don't know how to do this for yourself, you should probably seek professional help to do the tests.)

Forgot to Mention: The Tourbus guys have a tutorial on running the Shields Up! tests.