Ode to the MOD operator

I believe the modulus operator is the most underrated mathematical operator of any programming language. It is a clean, simple mechanism for linking a finite number of options with an infinite number of screening criteria.

Like the 12 animals in the Chinese Zodiac against anyone’s birth year, past or future:

This is convenient because more often than you might expect, the actual numbers are less important than the relationships between the numbers.

Three Things

A developer must know three things to properly support an application:

Expectation: What users believe the code does.

Intention: What the original developer intended the code to do.

Reality: What the code truly does.