Questions tagged [teaching-analogy]

Questions looking for analogies with which to teach computer science principles or concepts, or questions discussing specific teaching analogies for such computer science principles or concepts. Metaphors used in teaching is also an appropriate topic here.

Filter by
Sorted by
Tagged with
17
votes
16answers
2k views

What is a good analogy for the Object Oriented paradigm?

What is the most effective analogy that you have used or have thought of to teach the object oriented paradigm? Hopefully the analogy can translate well to inheritance as well, and includes the ...
4
votes
5answers
434 views

What non-programming book is vital for learning the CS mindset? [closed]

If you had to recommend a single book to introduce the way programmers think to anyone, but it had to be from outside the field of CS, what would it be? For programmers, my hands down, all-time, ...
36
votes
28answers
4k views

Analogy for teaching recursion

When teaching recursion, what is the best analogy people use to teach the idea of recursion. There are some nice artistic representations And the idea of repeatedly cutting a phone book or ...
21
votes
9answers
4k views

The Tao of TeaChing (Making Mistakes in Front of the Class)

How do you handle it when you make a mistake while teaching? I used to get confused, stammer, blush, etc. But now I just pause and notice that something is incorrect, then correct it if I can figure ...
21
votes
18answers
7k views

What are some good examples of using a stack data structure?

I'm looking for examples to give my students when lecturing about stacks, for use-cases of the stack in programming and life. So far I've been thinking of a pole of rings (when you can insert or ...
7
votes
4answers
366 views

Avoiding confusion about precedence

When mentioning operator precedence for AND / OR, I explained it wrongly. I re-explained it properly using the idea of binding: the operator "binds tightly" to the two expressions immediately on ...
5
votes
3answers
1k views

What is a good analogy to introduce databases and SQL?

I think that it is vital to introduce each subject area with a few handy, even if limited, images or concepts that make the idea clear. Here is how I introduce SQL (in part): SQL takes a set of ...
7
votes
7answers
958 views

Explaining how an Interface is a contract

When teaching Interfaces (in Java, for example), it is common to describe them as a contract. Which means that if a class implements an interface, it has to use the methods in the interface. As an ...