HOME

TheInfoList



OR:

The Zero one infinity (ZOI) rule is a
rule of thumb In English language, English, the phrase ''rule of thumb'' refers to an approximate method for doing something, based on practical experience rather than theory. This usage of the phrase can be traced back to the 17th century and has been associat ...
in
software design Software design is the process of conceptualizing how a software system will work before it is implemented or modified. Software design also refers to the direct result of the design process the concepts of how the software will work which co ...
proposed by early
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
pioneer Willem van der Poel. It argues that arbitrary limits on the number of instances of a particular type of data or structure should not be allowed. Instead, an entity should either be forbidden entirely, only one should be allowed, or any number of them should be allowed. Although various factors outside that particular
software Software consists of computer programs that instruct the Execution (computing), execution of a computer. Software also includes design documents and specifications. The history of software is closely tied to the development of digital comput ...
could limit this number in practice, it should not be the software itself that puts a hard limit on the number of instances of the entity. Examples of this rule may be found in the structure of many file systems' directories (also known as folders): * 0 – The topmost directory has zero parent directories; that is, there is no directory that contains the topmost directory. * 1 – Each subdirectory has exactly one parent directory (not including shortcuts to the directory's location; while such files may have similar icons to the icons of the destination directories, they are not directories at all). *
Infinity Infinity is something which is boundless, endless, or larger than any natural number. It is denoted by \infty, called the infinity symbol. From the time of the Ancient Greek mathematics, ancient Greeks, the Infinity (philosophy), philosophic ...
– Each directory, whether the topmost directory or any of its subdirectories, according to the file system's rules, may contain any number of files or subdirectories. Practical limits to this number are caused by other factors, such as space available on
storage media Data storage is the recording (storing) of information (data) in a storage medium. Handwriting, phonographic recording, magnetic tape, and optical discs are all examples of storage media. Biological molecules such as RNA and DNA are cons ...
and how well the computer's
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
is maintained.


Authorship

Van der Poel confirmed that he was the originator of the rule, but Bruce MacLennan has also claimed authorship (in the form "The only reasonable numbers are zero, one and infinity."), writing in 2015 that:


See also

* Magic number (programming)#Unnamed numerical constants


References

{{Design Software engineering folklore Programming principles