by Leon Rosenshein

GeoStatisticians vs Default Values

Statisticians love numbers. They love patterns. They find patterns everywhere. Add in a healthy understanding of GIS and/or an ArcGIS license and you never know what they'll find.

Consider the case of the 500 mile email. Imagine you're the part-time admin of the email system for a university and you get a call from a department head letting you know that they haven't been able to send email more than 500 miles away for a few days. What do you do? First, you ask if they're joking. then you ask how they came up with that range, then why it took so long to complain Once you've convinced yourself there's really a problem, you debug and fix it.

It turns out that in SendMail 5 the default connection timeout is 0ms. Not 50 or 10000, but 0. So if you have a bad config file the default is used. In most multi-user, shared systems the timeout is a minimum value, not an exact value. In this case, what with context switching, kernel transitions and blocking I/O calls, 0ms turned out to be about 6ms.

Do you know how fast a signal travels over fiber? Pretty close to C. And a good NIC can send an SYN/ACK back pretty darn quick (microseconds). So, the transport delay allowed for a connection is about 3ms * C, or 3 millilightseconds. and 3 millilightseconds is right about 500 miles. So with a bad config file any time the recipient was over 500 miles away the connection would time out, and the send would fail.

The moral of the story? ALWAYS have sensible defaults for your config variables OR fail on startup if they're not set.