Avoiding difficulties when teaching with metaphors It is said that metaphors can do more harm than good, and I agree that other methods should be developed, like the "notional machine" idea. However, computer science is not like anything else, because it is a constructed reality. It therefore seems like the best way to teach it is to show students how a new concept is similar to or related to things they are already familiar with.

What do you do to work around the the problems of using metaphors to teach, such as students' cultural divergence (and therefore ability to understand the metaphor)?
I love to make jokes and allusions. Here are some examples of ways I handle my increasing age difference from my students:

Explaining the reference

When describing how assembly language programmers compete to shave instructions off an operation (such as calculating absolute value), I tell students about the old game show Name That Tune and sometimes even show them a clip.

Challenging students to recognize the allusion

After teaching students about big-endian and little-endian, I ask if anyone recognizes where the references is from. If a student successfully guesses Gulliver's Travels (from the terms or from the images I include), they get a prize. If not, I explain.

Learning students' culture

As a sample app from my mobile development course (to demonstrate design docs), I designed a variant on Pokemon Go where students get and evolve professors by meeting with them. I paid someone on Fiverr to create Pokemon-like images of me.

Create memes

Students seem to enjoy memes. Here are some that I've created.

This one is about L2 caches: