Another nice pattern is to have any particular value written exactly once, or from exactly one place in the code if it gets updated.

For embedded control I'm finding the blackboard pattern with single assignment to be super useful.