David Malan
๐ค SpeakerAppearances Over Time
Podcast Appearances
When we get to searching algorithms and sorting algorithms, we very often have a student come up on stage, for instance, and for sorting or for searching.
We have a whole bunch of like gym lockers, small versions thereof that we put numbers in either on printed paper or little plastic numbers.
And the goal is to have a student like find the number 50 or some other number that we've hidden behind the doors.
And it's an opportunity just to talk about.
Either searching the doors linearly left to right, right to left, maybe
randomly maybe more methodically as via binary search if the numbers are sorted that then leads us to opportunities to talk about bubble sort and selection sort and insertion sorts algorithms that you probably wouldn't bother implementing or using in the wild because there's more performant ones certainly but we use them as these pedagogical tools to explore the problem to be solved which is alright I can only use binary search if the data is sorted so how do I sort it and how expensive is that going to be to make worthwhile the whole process in the get go and so we'll have
eight students come up on stage and sort themselves physically and really perform in certain ways.
And there's so many examples of that through CS50.
We try to do at least one such thing every class.
I mean, not unlike the way John Oliver, for instance, ends last week tonight.
We're trying to do some big song and dance, which ironically is always at the end as the hook.
We do try to put it maybe toward the beginning of lecture or in the middle, but that's
not just for engagement and not to keep folks' attention, but really to latch onto their memories.
So that even if you're in the weeds of this introductory computer science course, there's so much new information, it's the proverbial fire hose hitting you in the face, you can cling to, okay, all right, I remember my roommate was literally the one on stage acting out bubble sort, and you can kind of picture in your mind's eye,
what was happening.
Or that phone book example is a perfect one that years after leaving Harvard, we have alumni coming up to us and saying, oh, I still remember the phone book demo.
And those memorable moments, ideally theatrical in nature, I think are what brings material, whether it's CS or something else, to life.
But that is very much to engage any learner, present or remote, as opposed to being optimized for some technology.
Absolutely.
I mean, this is a criticism we get from some students, particularly those with prior background or among those more comfortable, where do we really need 10 minutes on linear search or, you know, another 15 minutes on binary search?