Why though? Why go through the trouble of creating a video explaining one of the worst sorting algorithms ever invented. Why do we even teach this in school?
edit: I really wasn't trying to gatekeep. Bubblesort is simply a shitty algorithm that has nothing to offer to the world. Teaching bubblesort is like teaching bogosort - there is nothing useful in the knowledge.
I always have to laugh when some gate keeper tries to act like a smart ass. Oh you are so smart but you can't see why they teach a stupid simple algo? Jesus Christ, it's to learn the basics and what not to do.
Donald Knuth actually stated in "The Art of Computer Programming" there is no practical reason to teach Bubble Sort aside from the catchy name. He recommends teaching "Insertion Sort" as the first O(n2 ) sort students are taught.
Owen Astrachan (principle investigator of the multi-year AP Computer Science courses & exams) agrees. The guy is actually on a personal crusade to stop teaching Bubble Sort totally. He's used far harsher language to describe it.
There isn't a great reason to teach Bubble Sort. It isn't gate keeping, it is just wasting the teacher's & student's time because literally every other sort is superior. Shell Sort is actually far more intuitive, and Insertion Sort is heavily used in modern hybrid sorts algorithms (some of the fastest known, as a fall back mechanism within quick sort's partitions). There's way better uses of everyone's time than teaching Bubble Sort.
What I'm trying to say is prioritizing subject matter to be impactful and make best use of everyone's time isn't gate keeping.
Donald Knuth actually stated in “The Art of Computer Programming” there is no practical reason to teach Bubble Sort aside from the catchy name. He recommends teaching “Insertion Sort” as the first O(n2 ) sort students are taught.
Bubble sort has nothing to do with a catchy name. It is stupid simple to explain to a broad variety of people. Regardless of sorting, it’s just an excellent beginner’s example of an algorithm.
Teaching insertion sort and pointing it out as O(n2) completely misses the point.
I am shocked that a professor at one of the greatest comp sci programs on the planet thinks bubble sort is not worth his 2 minutes.
There isn't a great reason to teach Bubble Sort.
It's simple.
While a comp sci class at UC or an AP class will only spend 15 minutes on this, a community college course is going to spend days on this, and have MANY students missing any real mathematical background.
I'll actually look into the reasoning behind this later but I cannot imagine a good reason for skipping a 15 minute lecture on this purely as and introduction and example on what not to do. For many, understanding the difference between insertion, bubble, and merge is a complex topic which will need reinforcement.
Yup, definitely wasn't trying to gatekeep.. was actually quoting my intro to CS professor from a decade ago.. he's known in his field for developing and writing books for CS101 courses. Gave a strong speech why he refused to teach bubblesort.
-15
u/[deleted] Dec 02 '19 edited Dec 03 '19
Why though? Why go through the trouble of creating a video explaining one of the worst sorting algorithms ever invented. Why do we even teach this in school?
edit: I really wasn't trying to gatekeep. Bubblesort is simply a shitty algorithm that has nothing to offer to the world. Teaching bubblesort is like teaching bogosort - there is nothing useful in the knowledge.