| Author | Matthias Felleisen,Robert Bruce Findler,Matthew Flatt,Shriram Krishnamurthi |
|---|---|
| Subject | Computer programming |
| Genre | Textbook |
| Publisher | MIT Press |
Publication date | February 12, 2001 |
| Publication place | United States |
| Media type | |
| Pages | 720 |
| ISBN | 0-262-06218-6 |
| LC Class | QA76.6 .H697 2001 |
| Website | htdp |
How to Design Programs (HtDP) is a textbook byMatthias Felleisen,Robert Bruce Findler,Matthew Flatt, andShriram Krishnamurthi on the systematic design ofcomputer programs.MIT Press published the first edition in 2001, and the second edition in 2018, which is freely available online and in print. The book introduces the concept of adesign recipe, a six-step process for creating programs from a problem statement. While the book was originally used along with the education projectTeachScheme! (renamedProgramByDesign), it has been adopted at many colleges and universities for teaching program design principles.
According to HtDP, the design process starts with a careful analysis of a problem statement with the goal of extracting a rigorous description of the kinds ofdata that the desired program consumes and produces. The structure of these data descriptions determines the organization of the program.
Then, the book carefully introduces data forms of progressively growing complexity. It starts with data ofatomic forms and then progresses tocompound forms, including data that can be arbitrarily large. For each kind of data definition, the book explains how to organize the program in principle, thus enabling a programmer who encounters a new form of data to still construct a program systematically.
LikeStructure and Interpretation of Computer Programs (SICP), HtDP relies on a variant of the programming languageScheme. It includes its own programmingintegrated development environment (IDE), namedDrRacket, which provides a series of programming languages. The first language supports only functions, atomic data, and simple structures. Each language adds expressive power to the prior one. Except for the largest teaching language, all languages for HtDP arefunctional programming languages.
In the 2004 paper, The Structure and Interpretation of the Computer Science Curriculum,[1] the same authors compared and contrasted the pedagogical focus ofHow to Design Programs (HtDP) with that ofStructure and Interpretation of Computer Programs (SICP). In the 14-page paper, the authors distinguish the pedagogic focus of HtDP from that of SICP, and show how HtDP was designed as a textbook to address some problems that some students and teachers had with SICP.
The paper introduces the pedagogical landscape surrounding the publication of SICP. The paper starts with a history and critique of SICP, followed by a description of the goal of thecomputing curriculum. It then describes the principles of teaching behind HtDP; in particular, the difference between implicit vs. explicit teaching of design principles. It then continues on to describe the role ofScheme and the importance of an idealprogramming environment, and concludes with an extensive evaluation of content and student/faculty reaction to experience with SICP vs. HtDP.
One of the major focuses of the paper is the emphasis on the difference in requireddomain knowledge between SICP and HtDP. A chart in the paper compares major exercises in SICP and HtDP, and the related text describes how the exercises in the former require considerably more sophisticated domain knowledge than those of HtDP. The paper continues on to explain why this difference in required domain knowledge has resulted in certain students having confused domain knowledge with program design knowledge.
The paper claims the following four major efforts that the authors of HtDP have made to address perceived issues with SICP:
The paper then distinguishes between structuralrecursion, where the related data definition happens to beself-referential, requiring usually a straightforward design process, and generative recursion, where new problem data is generated in the middle of the problem-solving process and the problem solving method is re-used, often requiringad hoc mathematical insight, and stresses how this distinction makes their approach scalable to theobject-oriented (OO) world.
Finally, the paper concludes with a description of responses from various faculty and students after having used HtDP in the classroom.