Engaging students with the subject matter in memorable ways is good and improves learning.
Whether a riddle would do so depends entirely on the particular riddle. Some riddles can be used to engage students and improve learning. Other riddles can make something simple seem hard, or can be discouraging.
I don't recommend putting nearly impossible unsolved problems on your white board and asking students to solve them as homework. (The reference, here, by the way, is to George Dantzig. Look him up.)
Likewise,
Zen koans, which are inherently paradoxical and don't have ready answers, but exist to get you out of the rut of thinking conventionally, make bad STEM teaching tools, even though they can be good for teaching Buddhist philosophy and getting people into a metaphysical mindset.
Riddles serve the same pedagogical purpose as songs, poems, interpretive dances, funny outfits, provocative or inspiring images, mnemonics, experiments, and video presentations. Good ones help, bad ones hurt, and a good execution or presentation of the teaching tool can make the difference too.
My father, who was also a choir director in his free time for most of his life, liked to compose songs to help his graduate students in environmental sciences remember and retain important concepts. Whenever alumni would visit campus, they'd always sing them and they never forgot the scientific substance that they were built around. The songs were something that really stuck, and it had the added bonus of building community among his students. The songs were often corny and were not musical masterpieces, but that was besides the point. They weren't about being exemplary works of art.
They also reflected his teaching philosophy, which was that a class in school was not a competition, and that the goal was for everyone in the class to learn everything that was being taught. His goal was for as many students as possible to get perfect scores on a final exam that captured everything he had set out to teach in a course, and for them to hold onto those lessons years into the future.
A riddle could do what those songs did too (even if it really just amounts to a corny or cheesy "dad joke"), but only a good riddle that is memorable is helpful.
This is related to the counterintuitive concept, familiar to experts in memorization, that it is easier to remember a fact when it is embedded in a larger narrative or context like
a memory palace, or the alphabet song, than it is to remember a fact in isolation. This is surprising, because there are more bits of data that have to be stored when remembering the complete context in addition to the facts, rather than only the bare facts themselves. But this is how human memory works.
Back in the day, before there was widespread literacy or even a written language at all, people remembered large quantities of facts and information by embedding them in epic poetry. They remembered the map of the stars at night by embedding them in imaginary pictures associated with mythological stories.
Riddles are just permutations on the same idea. They are basically just a stylized kind of story that is a close cousin of a
parable. They add gratuitous content to make it easier to remember the actual principle or fact that you are teaching.
But a riddle can be bad if it buttresses bad intuition, perhaps capturing a relationship between physical quantities that is true in that special case, but doesn't hold as a general rule, or relying for its punchline on some kind of sloppy or inefficient way of thinking about a problem that you are trying to discourage.
For example, a riddle that draws upon the fact that water expands when frozen, unlike the vast majority of other substances, would be a poor one to use to teach students about the general relationship between temperature and volume in condensed matter.
Similarly, while
Zeno's paradox might have its place in philosophy or advanced mathematics, it might lead a student who is inclined to think about it in a particular way to think that physics and calculus are mysterious and seemingly impossible, leading students to ignore their correct common sense intuition that finite distances can be traversed in finite times, or at least, causing them to overthink it.
With each riddle used you need to ask:
1. Is the riddle too difficult and discouraging? If it is, don't use it.
2. Does it help address a point that students sometimes struggle to grasp or remember? You should save the special and good stuff for circumstances where it is needed.
3. Is the riddle memorable? If the riddle is itself forgettable, it won't serve its purpose.
4. Does the riddle make the lesson embedded in it more memorable? The riddle should focus a student in on the principle you are teaching, not distract from it.
5. Does the riddle illustrate the rule or fact you are trying to teach in a way that generalizes properly? See above.