How to Design Programs

How to Design Programs

Free online book How to Design Programs is devided in to following sections – Processing Simple Forms of Data, Processing Arbitrarily Large Data, More on Processing Arbitrarily Large Data, Abstracting Designs, Generative Recursion, Accumulating Knowledge, Changing the State of Variables and Changing Compound Values.


This book is the first book on programming as the core subject of a liberal arts education. Its main focus is the design process that leads from problem statements to well-organized solutions; it deemphasizes the study of programming language details, algorithmic minutiae, and specific application domains. Our desire to focus on the design process requires two radical innovations for introductory courses. The first innovation is a set of explicit design guidelines. Existing curricula tend to provide vague and ill-defined suggestions, such as “design from top to bottom” or “make the program structural.” We have instead developed design guidelines that lead students from a problem statement to a computational solution in step-by-step fashion with well-defined intermediate products. In the process they learn to read, to analyze, to organize, to experiment, to think in a systematic manner. The second innovation is a radically new programming environment. In the past, texts on programming ignored the role of the programming environment in the learning process; they simply assumed that students had access to a professional environment. This book provides a programming environment for beginners. It also grows with the students as they master more and more of the material until it supports a full-fledged language for the whole spectrum of programming tasks: large-scale programming as well as scripting.

Table of Contents

  • Students, Teachers, and Computers
  • Numbers, Expressions, Simple Programs
  • Programs are Function Plus Variable Definitions
  • Conditional Expressions and Functions
  • Symbolic Information
  • Compound Data, Part 1: Structures
  • The Varieties of Data
  • Intermezzo 1: Syntax and Semantics
  • Compound Data, Part 2: Lists
  • More on Processing Lists
  • Natural Numbers
  • Composing Functions, Revisited Again
  • Intermezzo 2: List Abbreviations
  • More Self-referential Data Definitions
  • Mutually Referential Data Definitions
  • Development through Iterative Refinement
  • Processing Two Complex Pieces of Data
  • Intermezzo 3: Local Definitions and Lexical Scope
  • Similarities in Definitions
  • Functions are Values
  • Designing Abstractions from Examples
  • Designing Abstractions with First-Class Functions
  • Mathematical Examples
  • Intermezzo 4: Defining Functions on the Fly
  • A New Form of Recursion
  • Designing Algorithms
  • Variations on a Theme
  • Algorithms that Backtrack
  • Intermezzo 5: The Cost of Computing and Vectors
  • The Loss of Knowledge
  • Designing Accumulator-Style Functions
  • More Uses of Accumulation
  • Intermezzo 6: The Nature of Inexact Numbers
  • Assignment to Variables
  • Designing Functions with Memory
  • Examples of Memory Usage
  • Intermezzo 7: The Final Syntax and Semantics
  • Encapsulation
  • Mutable Structures
  • Designing Functions that Change Structures
  • Equality
  • Changing Structures, Vectors, and Objects

Book Details

Author(s): Matthias Felleisen, Robert Bruce Findler, Matthew Flatt and Shriram Krishnamurthi.
Format(s): HTML
Number of pages: 720
Link: Read online.

Leave a Reply