Michael Morrison: Thinking in Metaphors

By Caitrin McCullough

Here's installment #4 from Head First JavaScript author Michael Morrison. Enjoy!

mmorrison50.png A big part of the Head First approach to teaching involves metaphors, where a challenging concept is recast into a form that is more immediately accessible. I have a natural tendency to "think in metaphors," which helped quite a bit in writing Head First JavaScript. And as it turns out, thinking in metaphors is extremely useful in sorting out any complex issue, whether it's JavaScript, SQL, C#, or a complex real world issue such as molding behavior in children (more on that one in a moment).

The real trick to thinking in metaphors involves making the connection between a concept you're trying to understand and a concept that you already understand. One of my favorites in Head First JavaScript (page 61, for those of you reading along) cellphone.png involved trying to explain the idea of an "undefined" piece of data, which is data that has no value. It's a fairly simple concept but also deceptively tricky to teach concisely. It occurred to me that an undefined piece of JavaScript data is sort of like a voice mail system with no messages. It's a place where information is intended to be stored, but at the moment nothing is stored there. So when you call in to check your voice mail messages and get "you have no messages," that's the same thing as a JavaScript variable reporting that it is "undefined." By likening a new concept to a concept that you're already familiar with, the learning becomes much easier. At least that's the idea.

I also find it helpful to apply the same way of thinking/learning to the real world. A moment ago I hinted that you could apply metaphoric thinking to behavior in children. This one hit me when I was working on the landscaping around our house. My wife and I bought a house that had sat empty for several years, and in those few years all of the shrubs and bushes around the house had grown wild to the point of suffocating the house. As I hacked away at some of the huge bushes, which were now trees for all practical purposes, I grew frustrated that no one had taken the time to prune them periodically over the years. pruners2.jpg And because they hadn't, now I was stuck trying to reign in a plant that had grown completely out of control. See where I'm headed? It then occurred to me that these plants were very much like kids who didn't receive enough attention and guidance (behavioral pruning!) in their formative years. And as a result, society as a whole (their teachers, in many cases) is left with the same problem I had - attempting to make the best of a situation that has grown out of control due to inattention.

My point here is not to be preachy about parenting. The point is that thinking in metaphors can often link very unrelated ideas in powerful ways, often revealing insight into one from the other. So the next time you face a complex topic that is giving you fits, see if you can figure out a way to think about it in terms of something else you already understand.

AddThis Feed Button

 

 

Comments


I love this post... reminds me a bit about the "Creating Passionate Users" Blog... R.I.P.

I agree with you that metaphors are good for concepts, I loved the Remote Control concept in HF Java to explain how a reference variable is related to an object.

I actually devised my own metaphor for this concept as I read through the book. Since objects were represented by circles I likened them to balloons, and the arrows from the remote to the 'balloon' were strings holding the balloon, eg reference variables.

If you removed a string from a balloon with out first tying another sting to it the balloon would float away, eg get garbage collected.

I visualize that almost every time I code now.

 

Post a comment:






RSS Feed

Get the latest Head First books here!

Head First Servlets & JSP Cover Head First JavaScript Cover
Head First Software Development Cover

Head First Servlets & JSP, Second Edition, Head First JavaScript, and Head First Software Development are now available.

Buy 2 Books, Get the 3rd FREE! Use the discount code OPC10 when you buy direct from O'Reilly.

Head First SQL
Head First PMP