by StevenPaul · 8y ago · 0 comments
I think many could have yes, had they been in the same academic environment as the people who invented those things. It's amazing what normal people can acheive when they are isolated from the noise of modern corporate work environments and given the resources to focus on a problem.
Binary search is a great example because it's so simple and yet it's so easy to implement incorrectly. In Programming Pearly, Jon Bently shares how, over the years, he asked hundreds of programmers to implement binary search after providing them with a description of the basic algorithm. He gave them a very generous two hours to write it, and even allowed them to use the high-level language of their choice (including pseudocode). Surprisingly, only about 10 percent of professional programmers implemented binary search correctly. (Beautiful Code, p. 87)