How to Design Programs
   HOME

TheInfoList



OR:

''How to Design Programs'' (''HtDP'') is a textbook by
Matthias Felleisen Matthias Felleisen is a German-American computer science professor and author. He grew up in Germany and immigrated to the US in his twenties. He received his PhD from Indiana University Bloomington under the direction of Daniel P. Friedman. ...
, Robert Bruce Findler,
Matthew Flatt Matthew Flatt is an American computer scientist and professor at the University of Utah School of Computing in Salt Lake City. He is also the leader of the core development team for the Racket programming language. Flatt received his PhD at Rice U ...
, and
Shriram Krishnamurthi Shriram Krishnamurthi is a computer scientist, currently a professor of computer science at Brown University and a member of the core development group for the Racket programming languages, responsible for creation of software packages including ...
on the systematic design of
computer program A computer program is a sequence or set of instructions in a programming language for a computer to Execution (computing), execute. It is one component of software, which also includes software documentation, documentation and other intangibl ...
s.
MIT Press The MIT Press is the university press of the Massachusetts Institute of Technology (MIT), a private research university in Cambridge, Massachusetts. The MIT Press publishes a number of academic journals and has been a pioneer in the Open Ac ...
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 a ''design recipe'', a six-step process for creating programs from a problem statement. While the book was originally used along with the education project ''TeachScheme!'' (renamed
ProgramByDesign The ProgramByDesign (formerly TeachScheme!) project is an outreach effort of the PLT research group. The goal is to train college faculty, high school teachers, and possibly even middle school teachers, in programming and computing. History Mat ...
), 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 of
data Data ( , ) are a collection of discrete or continuous values that convey information, describing the quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpreted for ...
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 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, thus enabling a programmer who encounters a new form of data to still construct a program systematically. Like ''
Structure and Interpretation of Computer Programs ''Structure and Interpretation of Computer Programs'' (''SICP'') is a computer science textbook by Massachusetts Institute of Technology professors Harold Abelson and Gerald Jay Sussman with Julie Sussman. It is known as the "Wizard Book" in hac ...
'' (SICP), HtDP relies on a variant of the programming language Scheme. It includes its own programming
integrated development environment An integrated development environment (IDE) is a Application software, software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, an ...
(IDE), named
DrRacket Racket is a general-purpose, multi-paradigm programming language. The Racket language is a modern dialect of Lisp and a descendant of Scheme. It is designed as a platform for programming language design and implementation. In addition to the co ...
, 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 In computer science, functional programming is a programming paradigm where programs are constructed by Function application, applying and Function composition (computer science), composing Function (computer science), functions. It is a declarat ...
languages.


Pedagogical basis

In the 2004 paper, The Structure and Interpretation of the Computer Science Curriculum, a paper in which the authors compare and contrast HtDP with SICP. the same authors compared and contrasted the pedagogical focus of ''How to Design Programs'' (HtDP) with that of ''
Structure and Interpretation of Computer Programs ''Structure and Interpretation of Computer Programs'' (''SICP'') is a computer science textbook by Massachusetts Institute of Technology professors Harold Abelson and Gerald Jay Sussman with Julie Sussman. It is known as the "Wizard Book" in hac ...
'' (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 Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
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 of Scheme and the importance of an ideal programming 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 required
domain knowledge Domain knowledge is knowledge of a specific discipline or field in contrast to general (or domain-independent) knowledge. The term is often used in reference to a more general discipline—for example, in describing a software engineer who has ge ...
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: #HtDP addresses explicitly, rather than implicitly, how programs should be constructed. #To make programming easier, the book guides students through five different knowledge levels corresponding to data definition levels of complexity. #The book's exercises focus on program design guidelines, rather than domain knowledge. #The book assumes less domain knowledge than that of SICP. The paper then distinguishes between structural
recursion Recursion occurs when the definition of a concept or process depends on a simpler or previous version of itself. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in m ...
, where the related data definition happens to be
self-referential Self-reference is a concept that involves referring to oneself or one's own attributes, characteristics, or actions. It can occur in language, logic, mathematics, philosophy, and other fields. In natural language, natural or formal languages, ...
, 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 Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
(OO) world. Finally, the paper concludes with a description of responses from various faculty and students after having used HtDP in the classroom.


References


External links

* , 2018 2nd edition, 2003 1st edition {{Lisp programming language 2001 non-fiction books Computer science books MIT Press books Computer programming books Scheme (programming language) Creative Commons-licensed books