Via Simon, Tim Bray has a great article On the Goodness of Binary Search.
There's a story I heard from a prof, that the basic Binary Search idea was around when Alan Turing was still in diapers, but that the first 18 published implementations were buggy. And I know for a fact that the first few times I coded it I got it wrong.
All that said, the core idea of binary search is mind-bogglingly simple; you have a sorted array, you look at the middle element which tells you what you're looking for is in the top or bottom half, then you take that half, rinse and repeat until done.
Via PHP Everywhere, Artima.com: Put Abstractions in Code, Details in Metadata, part four of an interview with Andy Hunt and Dave Thomas.
Abstractions live longer than details. Details are volatile. Because details are going to change, put the details where changing them will create the least amount of friction. Typically that's outside the code base -- in a database, a properties file, or XML -- something acting as metadata. We suggest an overall architecture where you put your energy into creating the right abstractions in the code. And as much as possible, push the details out somewhere else where they are easier to change, because that is what's going to change.
I'm finally getting around to setting up a blogroll over on the left there. (Only on /weblog, not at the root... easy to do with my CMS without any weird conditionals (hah))
It's in progress. I'm going through my aggregator and seeing who I read regularly. Not done yet. Going to eat dinner.
new⇒I hate Norton Antivirus
Long long live AVG I love you!...
kevin sands: Sep 6, 7:31pm