4 ms·
I like to teach using analogies, but I don't know if there is a single analogy to fit all of them. And age of the intended audience might be important to know.
by coreyp_1 4y ago
I like to teach using analogies, but I don't know if there is a single analogy to fit all of them. And age of the intended audience might be important to know.
Essentially, programming is the communication of steps at a given level of abstraction.
You can give examples of how the command "open" is different, depending on whether you are dealing with a door, a book, or an app on their phone.
You can demonstrate giving commands at different levels of granularity (as different paradigms represent different world perspectives). For example, you can give them one-by-one instructions to open a door (stick out your arm, grab the handle, turn the handle, pull, etc.) vs. just saying "open the door".
The fine-grained controls can be applied to anything, but the operator may or may not know that the individual steps are all part of a single action. Likewise, "open the door" is a bundled-up set of commands, and are more concise, but it relies on the person knowing how to perform the action. "Open the combination lock" won't work unless the person already knows the combination. "Open the combination lock, and here is the combination" relies on the person knowing how to work the lock, but taking an argument. "Open the <insert something wild>" may not make sense, or may require specialized knowledge.
In other words, programming paradigms are simply different ways of bundling instructions.