A metaphor doesn't just cover distance when it connects 2 things. Whether comparing water under pressure to electricity or presenting a threshold guardian in a fairy tale as a model of a while loop, there has to be a fit between the worlds linked by the metaphor. The more correspondences the metaphor achieves in this comparison, the more useful it should be.
In order to delve deeper, let's establish some more vocabulary or, rather, borrow from the wonderfully clear Shawn M. Glynn in "Making Science Concepts Meaningful to Students: Teaching with Analogies," (2008):
So, the familiar concept is the analog; the unfamiliar one is the target. Glynn and colleagues offer that the systematic comparison of the concepts' features can be called a mapping. Mappings depend upon elaboration, the cognitive process of constructing relations between what is already known and what is new.
When mapping the features of a water circuit to those of an electrical circuit, the example above offers 4 correspondences, probably enough to qualify it as an elaborate analogy. (Contrast it with the bare-bones assertion "electricity is like water", a simple analogy lacking any elaboration.) In an elaborate analogy, each correspondence contributes to a learning scaffold extending from the analog to the target. "Elaborate analogies provide a rich, situated context for learning. By systematically mapping verbal and visual features of analog concepts onto those of target concepts, analogies can facilitate the cognitive process of elaboration. Elaborate analogies have been found to increase students' learning of target concepts and their interest in the concepts." (Paris & Glynn, "Elaborate Analogies in Science Text: Tools for Enhancing Preservice Teachers' Knowledge and Attitudes". 2004)
[Phew! We have to be careful with this powerful teaching tool because of the discrepancies that exist within mappings and the confusion they can produce. For example, electricity does behave like water under pressure in many ways, but a cut wire does not spew electricity in the way that a burst pipe gushes water. Most metaphors are imperfect, but the useful ones leave you revealing the correspondences rather than explaining the inconsistencies.]
When StoryCode increases the "distance" of a teaching metaphor by using fiction as the analog for a non-fiction target, the correspondences jump out more clearly and are engaged with more interest and energy by learners testing such an intriguing yet not immediately believable metaphor. This is elaboration at its best, evaluating the consistency of 2 structures, the arbitrary, absorbing fictional analog and the logical, replicable digital target.
In using fiction, StoryCode gains an additional advantage. Because of the endless variety of human imagination, the number of texts to choose from when selecting one's analog is practically limitless. If one short story produces too many inconsistencies when mapping its features to your target concept, simply discard the story and find one that fits more closely. Fiction is numerous and various. It is also mutable: with certain acknowledgements and apologies, you can bend or hammer the inconsistencies out of your analog until your mapping achieves a metaphor both broadly and deeply powerful.
A shared fiction text used as an analog also provides a final, powerful ability. The shared knowledge used to construct the scaffold for comprehending the target is not anything you must hope your learners have encountered in some other course or in their non-academic lives. It is precisely what you read in class together that day or for homework or whenever else you shared it, as close and as important to your teaching as the target. It persists throughout the learning and employment of the target concepts. In a particularly well chosen and elaborate metaphor, the understanding of the analog material will evolve with both its own unfolding plot AND the acquisition of target knowledge, generating 2-way elaboration in a mutually reinforcing dynamic:
Using literature as one's analog material is the best way I've found to move learners into this zone of intellectual speculation and examination. The challenge involved in mapping the fictional to the digital appeals to both the artistically and scientifically inclined, though each may feel the need to scoff before undertaking it. Have you discovered ways of reaching the same zone? What are the key factors in getting there?