Neljapäev, juuli 30, 2026

Ajalugu, Täna ajaloos

TÄNA AJALOOS, 24. juuli ⟩ Ameerika professor leidis mägedest maailmakuulsa hüljatud linna

How to Design Programs (HtDP) is a textbook by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi on the systematic design of computer programs. MIT Press published the first edition in 2001 and the second edition in 2018. In addition to the for-purchase paperback, it is also freely available online.[1]

The book is the first one to focus on the systematic design of code as opposed to the syntax of a currently popular programming language.[2] Its key concept is that of a "design recipe", a six-step process for creating programs from a problem statement in a step-by-step fashion. While the book was originally used along with the education project TeachScheme! (renamed ProgramByDesign), it has been adopted at colleges and universities for teaching program design principles, including UBC's popular on-line course.[3][4]

In order to support this novel approach, HtDP comes with not just one but a series of (five) beginner programming languages[5] and a suitable, novice-friendly IDE. [6]

The Design Recipe

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 of data that the desired program consumes and produces. The structure of these data descriptions determines the organization of the program.

Then, the book introduces data forms of progressively growing complexity. It starts with data of atomic forms and then progresses to compound forms, including data that can be arbitrarily large. For each kind of data definition, the book explains how to organize the program in principle, enabling a programmer who encounters a new form of data to construct a program systematically.

The Teaching Languages and DrRacket

Like Structure and Interpretation of Computer Programs (SICP), HtDP relies on a variant of the programming language Scheme. It includes its own programming integrated development environment (IDE), named DrRacket, 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 are functional programming languages.

Pedagogical basis

In the 2004 paper, "The Structure and Interpretation of the Computer Science Curriculum",[7] the same authors compared and contrasted the pedagogical focus of How to Design Programs (HtDP) with that of Structure 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 the computing curriculum. It then describes the principles of teaching behind HtDP; in particular, the difference between implicit vs. explicit teaching of design principles. It continues on to describe the role of Scheme and the importance of an ideal programming environment, and concludes with an evaluation of content and student/faculty reaction to experience with SICP vs. HtDP.

One of the focuses of the paper is the emphasis on the difference in required domain 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 more sophisticated domain knowledge than those of HtDP.

The paper claims the following four major efforts that the authors of HtDP have made to address perceived issues with SICP:

  1. HtDP addresses explicitly, rather than implicitly, how programs should be constructed.
  2. To make programming easier, the book guides students through five different knowledge levels corresponding to data definition levels of complexity.
  3. The book's exercises focus on program design guidelines, rather than domain knowledge.
  4. The book assumes less domain knowledge than that of SICP.

The paper distinguishes between structural recursion, where the related data definition happens to be self-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 requiring ad hoc mathematical insight, and stresses how this distinction makes their approach scalable to the object-oriented (OO) world.

The paper concludes with a description of responses from various faculty and students after having used HtDP in the classroom.

References

  1. "How to Design Programs". htdp.org. Retrieved July 27, 2026.
  2. Shapiro, R. Benjamin; DesPortes, Kayla; DiSalvo, Betsy (July 25, 2023). "Improving Computing Education Research through Valuing Design". Communications of the ACM. 66 (8): 24–26. doi:10.1145/3604633. ISSN 0001-0782.
  3. Olga Smith (October 31, 2014). Introduction to Systematic Program Design with Gregor Kiczales. Retrieved July 27, 2026 via YouTube.
  4. Yassa Taiseer (September 9, 2025). Why Racket is the Best First Programming Language. Retrieved July 27, 2026 via YouTube.
  5. Felleisen, Matthias; Findler, Robert Bruce; Flatt, Matthew; Krishnamurthi, Shriram (January 1, 2004). "The TeachScheme! Project: Computing and Programming for Every Student". Computer Science Education. 14 (1): 55–77. doi:10.1076/csed.14.1.55.23499. ISSN 0899-3408.
  6. Findler, Robert Bruce; Clements, John; Flanagan, Cormac; Flatt, Matthew; Krishnamurthi, Shriram; Steckler, Paul; Felleisen, Matthias (March 1, 2002). "DrScheme: a programming environment for Scheme". Journal of Functional Programming. 12 (2): 159–182. doi:10.1017/S0956796801004208. ISSN 1469-7653.
  7. The Structure and Interpretation of the Computer Science Curriculum. Journal of Functional Programming, Volume 14, Issue 4 (July 2004) Pages: 365 - 378 (PDF), NEU, 2004, archived (PDF) from the original on May 11, 2008 a paper in which the authors compare and contrast HtDP with SICP.

Lisa kommentaar

Sinu e-postiaadressi ei avaldata. Nõutavad väljad on tähistatud *-ga