-A A +A

HtDPTextbook Review

  • Curriculum is built around the idea of proper Design.
  • The Preface offers 6 steps in
  • The Basic Parts of a Design Recipe
    • Problem Analysis & Data Definition
    • Contract, Purpose & Effect Statements, Header
    • Examples
    • Function Template
    • Function Definition
    • Tests
  • Explaining that each step produces a well-defined intermediate product:
    • the description of the class of problem data
    • the informal specification of a program’s behavior
    • the illustration of the behavior with examples
    • the development of a program template or layout
    • the transformation of the template into a complete definition
    • the discover of errors through testing

 

  • On the second page of the first chapter the authors state:
    • “Small or large, a good program cannot be created by tinkering around.  It must be carefully designed.  Each piece needs a lot of attention; composing programs into larger units must follow a well-planned strategy.  Designing programs properly must be practiced from our very first day of programming.”

 
I think the previous quote sums up the tone of this book.  Methodical. 

  • I must admit, I’m a bit intrigued by this curriculum.  While I wish I could take such a course, I’m not sure I’d be happy teaching such a course. 
  • On a related note:  I’ve been reading over curriculums and textbooks for a few weeks now and have often tried to imagine what a group of students would think of creating the accompanying programs and exercises.  How to Design Programs is the first text/curriculum that has actually compelled me to download and install the software (teachscheme) and do the examples in the chapter. 
  • (I suspect this is because functional programming is something I have an interest in learning while the other curriculums would not involve any actual learning (programming wise) on my part.)
  • Math-based analogies.
  • I wonder about the difficulty level.  It could be my own lack of comfort with functional languages or my concern with the mathematical skill level of potential students.  (Produced from years of teaching high school students who, while quite adept at using a calculator, often lack basic math skills). 
  • An example design recipe from the text:

Contract:  area-of-ring : number number -> number
Purpose:  to compute the area of a ring whose radius is outer and whose hole has a radius of inner
Example:  (area-of-ring 5 3) should produce 50.24
Definition:  [refines the header]
               (define (area-of-ring outer inner)
               (- (area-of-disk outer) (area-of-disk inner)))
Tests: 
               (area-of-ring 5 3)
                50.24
I am struck by how this is the only programming curriculum I can think of that could actually get away with such pedantic meta-work.  The problems proposed in the text are actually challenging rather than the typical first programming assignments which are so wrapped up in how-to-program-type-issues that the problem solving seems almost trivial on top of all that.  I think this is in part because other languages are more natural?  Imperative programming has always mapped quite well to my own thinking.  Functional programming I suspect is a bit outside of most people’s realm of everyday thinking and so I might think it levels the playing field to some degree and causes everybody to work (but not excessively so) at solving the problems. 
The problems given in the first 20 pages are the type of problems I’ve given after months in my own first course.  And the problems involve an appropriate level of mathematical agility that is in reality required in the computer science discipline.  (Knowing calculus may not be a pre-requisite to computer science, but a strong mathematical foundation or mindset on which to base the necessary logic and reasoning surely is.)