Validating that data fits certain constraints is a prevelant programming task and how we approach it effects the system’s safety and reliability. Many approaches have been devised, and I recently realized the key difference between two major approaches: Design-by-Contract and Type-Driven Development.
Sometimes performance is an observable domain behavior that belongs in our normal test suite
Programmers often arrange boolean expressions in all kinds of groupings for readability. The semantic of these groups, however, is not readily apparent to programs and algorithms. It turns out we can have it both ways, boolean expressions can be algorithmically normalized to consistent depth and form.