I been running a series of online / IRL courses helping people to learn Creative Coding using Processing.
I’ve found that the use of metaphors can really help people get their heads around the weirder bits of learning to code.
But what about metaphors for coding as a whole? Should I go lego, marbles or cakes?
-
The “Lego” metaphor
Your program is a Lego/other building block animal which performs certain tasks.Your job as a programmer is to select the right objects to build the animal – you write the instructions to put it all together. You might not find the right block for you, and so you might have to describe the block you want (i.e. create a new object).Each block has its own properties (e.g. size, colour, weight, transparency, eyes/not eyes etc.) and might perform its own functions (e.g. hinge open, swivel). Your skill is to understand how all the blocks fit together to achieve your target block animal (a dinosaur?) that behaves the way you want (hardly any bloodthirsty rampaging). - The “Marble Run” metaphor
Your program is a large marble run construction.Your job as a programmer is to select the right chunks (or methods) to take the marble (or execution loop) and move it around the rest of the structure in a certain way. For example, an “if” chunk might move the marble left or right depending on certain criteria, or a “for” loop chunk might whizz the marble around 20 times, using it weight to achieve a task each time it goes round, until it spits it out the other side into the next chunk (or method). - The baking metaphor
Your program is a delicious confection of pastry & cream.
Your job as a programmer is to select the right ingredients and put them together in the correct recipe such that the resulting cake delights all that bathe in its vanilla scented deliciousness. Or at least doesn’t make them visibly retch.
Any more for any more?
*update* I went with the baking: see Cakes & Coding!