Unit-Testing the Brain


I recently bought The Reasoned Schemer by Daniel Friedman, et al, being a big fan of The Little Schemer and The Seasoned Schemer (A Little Java, A Few Patterns didn't grab me in the same way).

The Reasoned Schemer teaches logical programming in a functional programming paradigm. Of course, it's written in the same question / answer style as the other books—the book asks you a question that you may or may not know the answer to and then gives you the answer. It then asks another question and gives the answer and so on. There's no other content than these question / answer pairs other than a handful of "laws" and "commandments".

The questions cover a range of cases to make sure you understand the subtleties and edge-cases. You have to mold your mind so that it gets the right answer to one question and then refine your thinking further if you can't then handle the question that follows. Eventually, the questions have handled enough cases that you really grok what's going on.

It occurs to me that this style is basically a set of Unit Tests for the Brain.

As a really simple example, here are the first three pairs from chapter 7 which define what a 'bit' is in the context of the rest of the chapter:

That's just a unit test for your brain's concept of what a bit is. It's Test-Driven (Brain) Development.

The original post was in the category: books but I'm still in the process of migrating categories over.

The original post had 5 comments I'm in the process of migrating over.