Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

6
votes
4answers
96 views

Exercise or example to reinforce idea of functions?

I have a group of students with a very shaky understanding of functions and their purpose (encapsulation, reuse, modularization). The assignments I give them require them to write simple functions ...
6
votes
3answers
197 views

What are the pedagogical methods for teaching programming?

This is a very objective question. I want to know what are the methods for teaching programing? I'll provide a parallel example to make this clearer in case this causes any confusion. I have ...
6
votes
4answers
654 views

How Effective Is “Rosetta Code” as a Teaching Technique?

When working to teach developers Scheme (which is functional programming) I'll often show them analogous examples in C#. The ...
3
votes
3answers
90 views

Clear example of the Object-Relational Mismatch

An important issue in programming is the Object-Relational Mismatch, but I have not seen any good explanations that use familiar terms. I came up with one involving a Family Tree application. The ...
2
votes
2answers
108 views

Teaching intermediate Java to students familiar with C

The class I teach (a class whose teacher I assist1, to be precise) is learning intermediate Java this year (data structures, basic OOP and a few lessons about how Java actually works). A few of the ...
3
votes
3answers
141 views

Could physical (i.e. lego) models help teach CS?

In this video, https://www.youtube.com/watch?v=t5NszbIerYc Dr. David Brailsford uses an elegant Lego model to explain pointers and linked lists. Do you think that using physical models could make it ...
26
votes
21answers
12k views

Teaching students that printf() is not the same as return

For a few years, I have been teaching a programming class to first-year electrical engineering students -- thus, this is their first contact with computer programming. The language used is C (although ...
3
votes
4answers
107 views

Physical analogy to introduce a Delegate in .Net programming

Delegates are strange beasts (think Pointers with aspirations) and I was planning to introduce them using a physical metaphor: a power strip. The power strip connects to an 'event' (wall socket) and ...
6
votes
2answers
152 views

Is the CRT still relevant when introducing display hardware

In the context of an undergraduate course on microprocessors and architecture, I'm looking at how to introduce a VGA display peripheral. This is with the specific goal that they implement the ...
8
votes
7answers
327 views

Introduction to programming class: use Spreadsheets to introduce fundamentals

Are there any "pros" or "cons" I have overlooked regarding using Excel as a means to introduce a range of fundamental programming concepts. This question relates to teaching a programming module at ...
4
votes
6answers
134 views

What are some examples that could be used when teaching subroutines or methods in the context of OO?

I'm going to be teaching a group of high school students about programming, and I have a general curriculum designed already, but I can't quite figure out how to introduce methods. I'll be teaching ...
5
votes
2answers
249 views

Good, Motivating Examples for Algorithmic Complexity

I was recently reading a really good article on this topic, and I realize that it could be a very good added value for students to understand better and appreciate (and eventually put in practice) all ...
7
votes
3answers
288 views

How to explain combinatorical principles like the rule of product to students who “just don't get it”?

I assist in courses that provide mathematical background to computing science students. Every year, there are some who "just don't get" (in their words) concepts like the rule of product or the ...
11
votes
5answers
1k views

What are some good real-life examples of pipelining, latency, and throughput?

The textbook Computer Organization and Design by Hennessy and Patterson uses a laundry analogy for pipelining, with different stages for: washing drying folding putting away The analogy is a good ...
6
votes
4answers
327 views

What is a good way to explain computer viruses?

As part of my class, pupils have to learn what a virus is. I am looking for a better way to explain viruses or a better metaphor than the biological virus. The problem with a biological virus as a ...
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 ...
7
votes
4answers
307 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 ...
9
votes
5answers
606 views

How can I make database normalization more clear?

Database normalization is needlessly clouded by over-explanation. I reviewed a wide array of web articles and several textbooks before starting to teach it. After I became thoroughly familiar with the ...
6
votes
2answers
368 views

How do I explain blockchain using an analogy?

One of the next big thing that will get people interested are block-chain based technology. Many people are asking about "WTH is blockchain" and it seems that this will be asked quite a lot in coming ...
3
votes
5answers
378 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, ...
3
votes
2answers
181 views

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 ...
6
votes
5answers
277 views

Explaining how the Internet and the World Wide Web work

I have been having trouble finding a good resource (ideally a video) or analogy that helps me to explain how the Internet and the World Wide Web work. It does not need to be too in-depth. Only enough ...
5
votes
3answers
893 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 ...
13
votes
8answers
2k views

What would be a good analogy for IP addresses and ports?

What would be a good way to describe ports? I learned about it using this analogy, but it seems pretty inadequate to me: IP addresses are like street addresses of apartment buildings, and ports are ...
15
votes
10answers
2k views

Explaining access levels and visibility in OOP

While teaching OOP in a high school CS major (in java), it is important (and part of the curriculum in any case) to explain "what is the meaning of this public and <...
4
votes
1answer
86 views

Multi-client to server connection demonstration

I am trying to think of a way to demonstrate how a multi-client server works, from the aspect of the broadcast messages sent from the server in response to a message from one of the clients. I ...
19
votes
17answers
5k 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 ...
5
votes
2answers
157 views

Principles of SOLID in OOP

I am trying to prepare lessons about the five SOLID principles of Object Oriented Programming to high school students that have learned about polymorphism, abstract classes and interfaces. However, ...
11
votes
7answers
350 views

Intuitive example of an NP problem

I was talking to a student today, and explaining that NP problems are hard to solve, but easy to verify. I used password encryption/decryption as an example, but he got stuck. He was unable to ...
6
votes
1answer
170 views

How can I explain lambda calculus to my class?

My students are pretty confused by lambda calculus. I'm looking for a way to start them off. Is there some image or analogy for lambda calculus that I can use to help them understand in the beginning? ...
8
votes
10answers
754 views

What is a good analogy for pass by value vs by reference?

In general, there are two ways arguments can be passed to a function. Functions can either be passed a reference to an object, or the value of that object. This is something that my students often ...
7
votes
7answers
320 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 ...
8
votes
6answers
358 views

Analogy for abstract classes

Abstract classes are peculiar things. Consider: ...
9
votes
7answers
301 views

Analogy for static objects (or members)

I'm trying to think of an analogy to explain how static members, references and objects work. What I have in mind is saying that static is like the number of computers in the world. That parameter ...
16
votes
16answers
1k 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 ...
34
votes
28answers
3k 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 ...