« Archives in September, 2007

Programming Pearls: A solution to Exercise 1-8

“When the programmer faced the problem, all toll-free phone numbers in the US had the 800 area code. Toll-free codes now include 800, 877, 888, and the list is growing. (a) How would you sort all of the toll-free numbers using only a megabyte? (b) How can you store a set of toll-free numbers to allow very rapid lookup to determine whether a given toll-free number is available or already taken?”

»Read More

Programming Pearls: A solution to Exercise 1-7

This problem concerns the robustness of the number-sorting program written for Column 1, Exercise 3. Unfortunately, it is extremely difficult to answer questions about how you would handle error conditions without a pretty specific definition of the user requirements. The column gives only a cursory description of the problem that is being addressed, and so it is difficult to deduce these requirements.

In any case, here are my responses to the posed questions.

»Read More

Debo’s 5-minute peanut-butter granola recipe

I stole this recipe from someone a few years back, and I’ve since added a few things. I went backpacking with some friends this past weekend, and I made about a kilo of this stuff for breakfast. My comrades made fun of me (“how are we going to eat all that?” etc.) but by the end of the second day, it was almost all gone! :) (Mind you, I had a lot to do with that.)

If you have 5 minutes and some very basic ingredients, you can make this wicked snack.

»Read More