the zero-one-infinity rule

expression

programming

Allow none of a thing, one of a thing, or any number of a thing; every other limit is arbitrary.

Attributed to Dutch computing pioneer Willem van der Poel, the rule says arbitrary caps (three login attempts, sixteen partitions, 255 characters) encode a guess about the future that the future will disprove. Zero and one are structural choices; everything above one should be bounded only by resources. Half the compatibility warts in legacy systems are violations of it, fossilized.

The zero-one-infinity rule says the only reasonable numbers in a design are zero, one, and any number at all. Willem van der Poel's observation is that every other limit is arbitrary, and arbitrary limits are discovered by users at the worst moment.

The historical evidence is extensive and expensive. Two digits for a year, eight characters for a filename, thirty-two bits for a timestamp, a fixed maximum of interfaces per device: each was reasonable when chosen, each became a migration project, and several became industry-wide events. The limit is always chosen by someone who cannot imagine the case that exceeds it, which is exactly the case that arrives.

The honest counterweight is that unbounded is not free. A limit of infinity means an attacker can supply infinity, so resource exhaustion becomes the failure mode, and real systems need bounds for memory, request size and recursion depth. The reconciliation is that limits should exist for resource protection, be configurable rather than baked in, and be chosen an order of magnitude beyond any plausible legitimate use rather than just above the current one.

All glossary entries