Compare adding padding to elements in CSS to adding fillings to a sandwich; it actually increases the total width.
Compare the head and body tags in HTML to the Headless Horseman to help students remember what gets displayed on a web page.
Have students brainstorm about the data structure Pandora uses for playlists to help motivate arraylists or linked lists through comparison to everyday life.
Help students monitor their emotional experience to know when they should take a break from writing code to maximize learning and student attitudes.
Have students design projects based on content from their other courses, and have them brainstorm how the code they write might be useful in a variety of fields. This broadens their understanding of CS’s many applications.
Give students assignments where students have to make their computational results understandable to their customer, an important skill for industry computation across fields.
Explain that arrays work like a dresser of clothing to help students understand this abstract data structure by relating it to structures they know.
Compare recursion to painting the layers of a Russian nesting doll to help students understand the concept.
Analogize stacks and interrupts using a story in which a person is frequently interrupted in the course of performing everyday tasks.