When bubble sort is not terrible, and clever physics experiments
We learn the one case when bubble sort is surprisingly not a mistake, and also about how troublesome it could be back in the early 1900s to figure out fundamental physical properties of matter.
There are a lot of new readers this week. Thank you for giving me that trust! I intend to be responsible with it, but let me know if I'm not.
New articles
The Vindication of Bubble Sort
I have strong opinions on bubble sort. I used to think insertion sort was better than bubble sort on every dimension, because practically speaking, it is. And we shouldn't teach bubble sort because students pick up bad habits from it.
Except there is this one weird use case for bubble sort: when a sorted order is not actually that important yet should still happen incrementally.
Full article (2–5 minute read): The Vindication of Bubble Sort
Flashcard of the week
So far, I have read the first half of The Idea Factory. It is nice and I want to finish it, but it wasn't gripping enough that I didn't let other reading get in the way, obviously. But here's one thing I learned:
What was the precursor to the oil drop experiment, and why did it fail?
The oil drop experiment was how we (and by we I mean humans) figured out the charge of the electron back in the early 1900s.
We sprayed a fine mist of negatively charged oil between charged metal plates, meaning the droplets fell inside an electric field. Then we tweaked the strength of the electric field until the oil drops maintained a fixed velocity up or down. The velocity of the droplets was determined optically, by shining a strong light at them and counting seconds when they were falling.
Once they fell (or rose) with a constant speed, we knew that the electrical force exactly balanced gravity, and then we could figure out how strong the charges of the electrons had to be.
First off, I want to draw your attention to the ingenuity of the experiment design. In those days, didn't have the fancy technology to directly measure the things we wanted. Instead we figured out really clever ways to expose particular properties of matter anyway, indirectly. Really cool.
Now, what was the precursor experiment and why did it fail?
The water drop experiment, which failed because water evaporated.
That says it all, really. We first tried doing the same thing with water, but even in as near a vacuum as we could make, the water droplets evaporated too quickly to be able to look at them falling. Such a relatable experience!
Your opinions
Especially you, new readers! I'd be happy to hear what you like or don't like about this. Just reply to this email and I'll read the answer.