by shigemk2

当面は技術的なことしか書かない

97 Things Every Programmer Should Know 84 Thinking in States

PEOPLE IN THE REAL WORLD HAVE A WEIRD RELATIONSHIP WITH STATE.

These states are important, and you need to check that you're in the expected state before doing operations, and that you only move to a legal state from where you are.

Visualize them to make them simple to understand and easy to talk about.

If you find the state checks to be noise, learn how to use a tool, code generation, weaving, or aspects to hide them. Regardless of which approach you pick, thinking in states will make your code simpler and more robust.