[plt-scheme] Re: Permutations (newbie)

From: Danny Yoo (dyoo at hkn.eecs.berkeley.edu)
Date: Sun Sep 17 16:01:25 EDT 2006

>> 2. Follow the design recipe. You're obviously not and that explains
>> your struggle.

Hi Andrew,

Understand that if you bring up a problem from HTDP onto the mailing list, 
the default response will be: "did you follow the design recipe?" *grin*

>> For example, a test is not
>>   (f 10) ;; test
> Are the recipes provided in the book actual standard Scheme idiom?

The recipes are really they're there for you, not the computer.  They're 
scaffolding to help a beginner human programmer to think and design their 
programs with some care.

> I interpreted them as just one way of approaching programming.

Yup, but that particular way is pretty much the heart and soul of the HTDP 
book.  If you mention a problem in that book, there's going to be a strong 
assumption that you're using the problem-solving approach advocated by the 
text.  Other textbooks are more of a grab-bag of problems, but HTDP is 
unique because it puts so much emphasis on problem solving similar to
G. Polya's "How to Solve It".

That's why Matthias is recommending you to look at it and not dismissing 
the templates and recipes: the point of the textbook is not really about 
Scheme, but about doing the up-front "design" work in the recipes to solve 

> My "; test" comment was there just a reminder to myself and I didn't 
> intend to post that entire line.

In the HTDP (and most other computer programming contexts), the term 
"test" has a very specific meaning: a "test" isn't just an exercise that 
runs the function with given input.  By the term "test", we really mean a 
specification for both the inputs into the function AND the expected 

> I do not follow the templates - just read the syntax, tutorials and 
> assignments, and think of my own solution if they strike me as useful.

Although you can use the HTDP book for that approach, it's missing out on 
a lot of what the HTDP curriculum provides.  The HTDP book has a 
particular process for attacking problems, encoded in a "design recipe" 
that is often very effective.  It will work even if one isn't brilliant. 
And for that, it's worth considering.

It is a book, however, and you can of course use it in any way you want. 
If you do want another source of interesting problems and assignments, 
take a look at "Structure And Interpretation of Computer Programs":


Good luck to you!

Posted on the users mailing list.