Tip:
Highlight text to annotate it
X
The moral of the story is this is tricky.
There are a lot of cases to deal with in getting this kind of search just right,
and we made a couple mistakes along the way.
I sort of duplicated the history of the field.
There a couple tools we can get to avoid mistakes.
One tool is to write lots of tests,
and I just didn't do enough testing. I wanted to go fast.
I wanted to be able to show you some of the interesting ideas.
I put in a few tests, but I really need more to have confidence that I've got this right.
The second thing is to use, or better yet, reuse existing tools.
Every time I do a search, I don't want to be rewriting this search routine from scratch,
because it is tricky and I will make mistakes.
Rather I want to write it once or have somebody else write it once
and then reuse it.
In order to do that, we're going to have to figure out how to generalize.
I've written a a function that's good only for solve the bridge problem through search.
I want to write a search function that can solve a wide variety of problems.
Then I want to reuse that so that I'm not repeating mistakes,
and I'm not introducing new errors.