News for hackers. Stuff that matters.
Re:Are you one of the 10% of programmers who can write a bin... by raganwald on Monday April 19, 2010 @04:09PM (#1277698)
> for something as simple as a binary search there is nothing to increment. Maybe I misunderstand and you meant "incremental" as in where you write a whole algorithm, make sure it works, and then improve it (optimise/remove bugs/add features - not finish it)?

I strongly suspect--and I am not being sarcastic or falsely modest--that I am not up to scratch as far as programming is concerned. I almost always get stuff like this wrong when I implement it. My code breaks for empty lists, or with just one element, or lists with an odd number of elements, or something else I can't imagine.

Exposure to recursive algorithms has taught me to build this kind of thing up from simple cases like an empty list or a list with one element. So yes, I really would write a version that works for the empty list, a version that works for either the empty list or just one element, and go from there.

Re:Are you one of the 10% of programmers who can write a bin... by eru on Monday April 19, 2010 @04:59PM (#1277835)
You'll love "How to Design Programs" (http://www.htdp.org/), they put a lot of emphasis on structural recursion.