Metaphors we learn to program by
evanlh.com
Metaphors we learn to program by
1–10 of 15 posts
Re: Metaphors we learn to program by
#2>Could we do more to make programming an accessible activity to the 99% of people who don’t program, by putting greater emphasis on intuitive physical analogs?
I think this would have to be done carefully.
Being able to articulate your thoughts and compute without resorting to physical analogies can greatly reduce the processing load on your brain. This is partly due to the fact that analogies always come with a baggage of extra features that are unrelated to the concept you actually care about.
Perhaps a good way to overcome this would be to carefully pick a set of analogies for a concept,then identify what about these multiple analogies helps you understand it. It would also help you abstract away the additional semantic load that comes with the chosen physical analogies.
I am however, a strong believer in the power of metaphors to democratize complex craft.
Music composition per example, can be made more intuitive and accessible by thinking of sounds events in terms of their physical analogues. In the case of sounds however, the extra semantic fat may very well be marbling on wagyu beef.
In fact, it would help us think of musical composition in a more... compositional way, i.e. combination of parts with different semantic properties that when combined following certain rules, generate an expression with a particular meaning.
Re: Metaphors we learn to program by
#3I think about this a lot and I do tend to think that better analogies and metaphors can help people get into programming.
Two areas I've mined for analogies are cooking and legal work.
There is a book called developer hegemony that I have not read yet. As I understand it makes the comparison between software developent and being a lawyer. Seems like there might be some good ones in there to use.
The other one is cooking. When I talk to people about writing code who have never done it before one of the concerns they often have is that they could never write it exactly "right" that it's too complicated in that way. I like the analogy of cooking here to try to explain that while there is the 5 star chef version, there is also making a grilled cheese at home. I think you might be able to take that analogy pretty far. Comparing meals to software and so on. Talk about ingredients as libraries, that sort of thing ("you can start with flour or there is some delicious puff pastry in the pip3 cabinet")
Re: Metaphors we learn to program by
#4I can't recall how dependent I was on physical metaphors when I was first learning to code. I do, however, remember some times that I tried to learn concepts and a spatial metaphor set me back significantly. Like "railway-oriented" for async error handling (which just over complicated things), or "monad is a burrito" (which, was fine for when you already understood the concept, but useless before). I guess my point is that it's quite difficult to know if a metaphor is a good learning tool if you already know the concept.
[1] https://ravik.substack.com/p/an-anthropology-of-clean-code
Re: Metaphors we learn to program by
#5Re: Metaphors we learn to program by
#6Lakoff himself talking about cognitive semantics https://www.youtube.com/watch?v=JFgFjdCo2Js
In software architecture, metaphors may help us to better identify objects and their interaction patterns.
Re: Metaphors we learn to program by
#7Re: Metaphors we learn to program by
#8For example, I never think of a physical dictionary when using the data structure. Much less a heap or a tree (we even draw those with the root at the top!). And the stuff in the article about database queries being “supplications” is just ridiculous. It’s again an abstract idea. No idea of a the social relationship between humans ever enters the picture in any way, metaphoric or otherwise.
What’s hard about programming isn’t the names, it’s learning the concepts. At least in my opinion.
Re: Metaphors we learn to program by
#9Re: Metaphors we learn to program by
#10Make sure to follow up "Metaphors We Live By" with a read of Lakoff's "Women, Fire and Dangerous Things", which explains how meaning is constructed by ultimately relating sounds to body experiences, a must-read for the interested student of linguistics (amateur or professional). Lakoff himself talking about cognitive semantics https://www.youtube.com/watch?v=JFgFjdCo2Js In software architecture, metaphors may help us…