3 ms·
I'm pretty sure every programmer learns about binary search near the beginning, and even without that has searched through some alphabetical listing without sta
by pixelpoet 3y ago
I'm pretty sure every programmer learns about binary search near the beginning, and even without that has searched through some alphabetical listing without starting at aardvark (if not, I'd argue they have zero hope at much of anything abstract).
Really feels like a stretch to credit git, of all things, with that fundamental understanding. It's like saying you need to operate a nuclear power plant to understand the benefits of locking doors.
- xenomachina 3y agoWhen people search through alphabetical listings, they usually don't use plain old binary search, but instead use something like interpolation search. For example, if you want to find the word "xylostroma” in the dictionary, you aren't going to start in the middle. Instead, you'll start about 90% of the way through, and then make adjustments based on how far off you were.
- lost_tourist 3y agoYeah but that is only optimal if you know the general location. Often when you have a bug you don't know where it snuck in, especially if it's something like a race condition.
- xenomachina 3y agoSure. My point was just that contrary to what programmers typically think, people don't use binary search to look up things in a dictionary.