Passing It Along

Passing It Along: Chain of Responsibility: The Coin Sorter.

Updated

  1. Chain of Responsibility: The Coin Sorter (Journeyman): When every voice command has to pass a night-time check, a someone's-home check and a permission check, one function full of ifs grows with every new check and gets copied for every new device; a Chain of Responsibility makes each check its own link that stops the command or passes it on, so checks can be added, reordered and reused.