Fazal Majid's low-intensity blog

Sporadic pontification

Fazal

Born Free and Equal

For fans of Ansel Adams, the Library of Congress has an online exhibit based on his book “Born Free and Equal”. This book is a series of photographs taken at the Manzanar camp in California where Japanese-Americans were interned during World War II.

A book version has been reprinted.

Update (2002-09-16): This article in The Atlantic sheds some light on the background for the original exhibition.

Peer-to-peer collaborative spam filtering

An interesting product from a young company called Cloudmark addresses the spam explosion.

It works as an Outlook add-in that allows you to flag a message as spam and uploads a signature to the network, and thus helps other Cloudmark users to block the spam, in effect acting as a distributed peer-to-peer Brightmail.

It remains to be seen whether this system will be resistant to denial of service or poisoning attacks.

Update (2002-07-10): I’ve been trying it out for three weeks, and so far it looks pretty good. Out of 353 spam I’ve received, it successfully blocked 233. It also gave 3 false positives from permission marketing companies (Art.com and MyPoints), which is not absurd as they have very poor optout management. But it also flagged an IEEE newsletter as spam, which seems a little bit excessive. So, use with precaution.

The Thames and Hudson Manual of typography

Ruari McLean

Thames and Hudson, ISBN: 0500680221  Publisher

coverThis is a curious book, part tutorial, part cookbook, part personal war stories, including the author’s pet tools and techniques.  It was obviously designed before computers were commonplace and many sections dealing with hot metal type or phototypesetting are completely obsolete nowadays.

The beginning has a decent introduction to the history of typography and typefaces.

The middle part concerns itself with working around the constraints of metal or copyediting before word processing systems became commonplace. If nothing else, it should give us a renewed appreciation of how much tedious labor computers save us, such as not having to count characters to find out how many pages will be required.

The final part on layout for stationery, books and magazines is pretty good, but not very systematic, and carries the same war story flavor as the section on recommended tools.

All in all, this book has some interesting information, but I would not recommend it to anyone who wants to learn how to produce beautiful documents out of his desktop publishing setup. Robin Williams’s “The PC is not a typewriter”, Robert Bringhurst’s “The Elements of Typographical Style” or even Donald Knuth’s books on computers and typography are better choices in this respect.

Using Wake-on-LAN with Python

Most modern PCs and Macintoshes feature Wake-on-LAN. This feature, originally called “Magic packet” (PDF) by AMD, allows you to start a PC remotely by sending a specially formed “magic packet” to its Ethernet interface. On Macs running OS X, Wake-on-LAN seems to work only when the Mac is in sleep mode, not when it is completely turned off. The original intent was to allow administrators to boot PCs remotely to run backups, but with the spread of DSL, there are other uses.

For instance, I have a low-noise Solaris machine running 24/7 at my home (angband.majid.fm), and when I need to access my (noisy) home PC, I just log on to that machine via SSH, wake up the PC and then log on remotely using pcAnywhere. The same works with my iMac G4

Here is a very simple Python script that starts a machine with a given MAC address:

import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.sendto('\xff'*6 + '\x00\x02\xb3\x07\xb6\xd1'*16, ('192.168.1.255', 80))

It will start the machine with MAC address 00:02:B3:07:B6:D1 on the subnet 192.168.1/24 by sending a Wake-on-LAN magic packet to the subnet-directed broadcast IP address.

Update (2003-12-05):

Now that you have woken your Mac, how do you send it back to sleep? Read this article to find out.

Update (2006-03-19):

On certain versions of Linux, you may get a “permission denied” error message because you are trying to send a packet to a broadcast address. The following code should work:

import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.sendto('\xff'*6 + '\x00\x02\xb3\x07\xb6\xd1'*16, ('192.168.1.255', 80))

Rules of thumb

Typography

The optimal line length for readability is around 10-12 words (Source by Ruari McLean)

Telecoms, networking and IT

The ratio of peak load to average load in a service with diurnal activity variations is approximately 3 to 1. Source: my own empirical observation from Wanadoo access logs and France Telecom telephone call usage logs.

Probability of a Web page having X incoming links referring to it: P = X ^ -2.1 (Source)

When specifying computers, for balanced performance provision one gigabyte of RAM per gigahertz per core/thread.

Any standard making use of ASN.1 is a piece of junk.

You only get the benefits of statistical multiplexing or compression once, and it should only be done in one layer. Any other layers attempting to do the same only add cost, complexity, brittleness, overhead and latency.

When designing high-availability systems, fail-over is not the hard part, falling back is.

Photography

For most ordinary lenses, optimal sharpness is around f/8. For high-quality lenses, it is one or two stops below full aperture. Only the very best lenses are diffraction-limited and offer optimal performance at full aperture.

Camera light meters are calibrated for 12% gray. Common gray cards are 18% gray, so if you use one for metering, you should open up one half stop to compensate. (Source)

The human eye is a 6-7 megapixel sensor. The monocular field of view is 180 °, the binocular field of view is 120-140°, and the normal focus of attention spans a 45° field of view.

Avoid Kodak products like the plague. Those products they make that are actually decent (i.e. the engineers managed to sneak them past the bean counters) soon get adulterated (like Tri-X) or discontinued (like PhotoCD or their medium-format digital backs). Prefer Fuji, Agfa or Ilford.