The Zero One or Infinity (ZOI) Rule

I learned something yesterday that I wanted to share really quick: there is no two in programming, but this can apply to troubleshooting and database design too.

What this means is that there are units that either aren’t allowed to exist, are allowed (or supposed) to exist only once, and those that are allowed to have no limit – but there is no other kind, no other in between those types.

For example, in Excel there can only be one name for a cell or range, but a near infinite amount of cells.  In Access there can only be one primary key, but a near infinite amount of entries.  In HTML there can only be one H1 tag, but many H2 tags.  In CSS, div id names must be only used once, but div classes can be used more than once (infinite).

It’s called The Zero One or Infinity (ZOI) Rule.

Posted

in

by