Using Exceptions to Escape from Third-Party Libraries

While this point is not strictly speaking related to zen-level (as it is not about preventing programming errors) it remains a useful tool in the software designer’s toolbox: Unchecked typed exceptions found in Java and many other languages can be used as a very powerful break statement. Common wisdom says that using exceptions for control […]

Can we Have Zen WET Code?

The DRY Principle says you Don’t Repeat Yourself when writing code. Encoding the same knowledge in two distinct locations means that if the information changes, we need to update both of them. Failing to apply this principle leads to what is humorously called WET code. (“Write Everything Twice” or “We Enjoy Typing”, according to Wikipedia […]

Shearing Layers

Layers Shearing layers is a principle originally expressed for buildings: things that change at a different pace should be kept separate. Service like electrical wiring needs to be changed more often than the load-bearing structure, and load-bearing structure is expensive to change. If wiring is nested in the structure in such a way that changing […]

Finding Zen Solutions to Problems

Can we derive a systematic procedure for finding high quality solutions to design problems? I have so far given specific solutions to specific problems for illustration purposes but this website is not meant to be a recipe book; my goal is to give you the means of finding your own solutions to the problems you […]