Diagrams R Us

Screenshot 2015-11-10 22.00.24

Programming is a subset of system thinking and modeling. System models are often displayed in diagrams, but not always. Sometimes, a model may reflect a bi-directional flow, in which case, we may use an equation. The equals sign (=) in any equation is shorthand for two opposing arrows. I've collected four types of models in Pinterest. These are labeled FlowMixed, FlowRule, FlowData, and FlowControl. We really have only one type of flow since control flow is a type of data flow where the datum is a simple signal (such as a wave containing "squares", pulses, leading, or trailing edges). Still, control vs. data flow is a common distinction within the computer science literature. Here is a brief guide to the three major flow types: (1) control flow is like a relay race: a flow of control that is frequently in the form of a sequence. Food recipes or cartoons are good examples of control flow: 1, 2, 3, .... Branching occurs based on a decision or a comparison (e.g., in engineering, we have comparators, and humans or control systems use decision blocks). If the flow is all about decisions, we call it a decision tree. (2) data flow is more general since data are generally processed along the way. Most computers prior to World War II were analog, and thus, data flow. The ancient Antikythera mechanism was data flow. Mechanical clocks are data flow machines. The real world is saturated with data flow, which is why most science and engineering disciplines employ these types of models in physical systems. (3) Rules suggest "micro flows." If this then that. Often rules are good for modeling sensing, controlling, actuating in that order.  Do you like thinking in terms of diagrams? If you do, go into engineering or system modeling. It is a great way of interpreting the world around you.