Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The best analogy I've found to explain programming are cooking recipes.

You have input (ingredients), a procedure (recipe), output (what the recipe is for). From there you can start a transitioning towards more abstract ideas.

Knitting is another analogy that can be used.



An exercise that stuck with me from when I was in 4th grade or so was when everybody in the class had to write down instructions on how to make a peanut butter and jelly sandwich, and then the teacher would follow the instructions very literally and see how close everybody could get to a sandwich.

Of a class of like fifteen kids, I believe I was one of the only kids to end up with something that was recognizably a sandwich (slice of bread with jelly on a crumb face, slice of bread with peanut butter on crumb face, slices put together such that the edges of the two slices line up and the peanut butter and jelly are on the inside as opposed to the outside).


>>Knitting is another analogy that can be used.

And it's not mere coincidence that one of the first programmable machines was a loom that took paper-tape instructions, in the year 1725. https://en.wikipedia.org/wiki/Basile_Bouchon


Right. And Herman Hollerith (of IBM fame) took punched cards, that were mainstream in the textile industry, and used it to create the "tabulating machine", the computer used to streamline the US census.


This project of mine uses 'recipes', 'ingredients' and 'products'! http://akkartik.name/post/mu




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: