How to Design Programs

An Introduction to Programming and Computing

by Felleisen, Findler, Flatt, Krishnamurthi

ISBN: 9780262332866 | Copyright 2001

Click here to preview

Tabs

This introduction to programming places computer science in the core of a liberal arts education. Unlike other introductory books, it focuses on the program design process. This approach fosters a variety of skills—critical reading, analytical thinking, creative synthesis, and attention to detail—that are important for everyone, not just future computer programmers.The book exposes readers to two fundamentally new ideas. First, it presents program design guidelines that show the reader how to analyze a problem statement; how to formulate concise goals; how to make up examples; how to develop an outline of the solution, based on the analysis; how to finish the program; and how to test. Each step produces a well-defined intermediate product. Second, the book comes with a novel programming environment, the first one explicitly designed for beginners. The environment grows with the readers as they master the material in the book until it supports a full-fledged language for the whole spectrum of programming tasks.All the book's support materials are available for free on the Web. The Web site includes the environment, teacher guides, exercises for all levels, solutions, and additional projects.

Expand/Collapse All
Contents (pg. v)
List of Figures (pg. xiii)
Preface (pg. xvii)
I Processing Simple Forms of Data (pg. 3)
1 Students, Teachers, and Computers (pg. 3)
2 Numbers, Expressions, Simple Programs (pg. 5)
3 Programs are Function Plus Variable Definitions (pg. 21)
4 Conditional Expressions and Functions (pg. 29)
5 Symbolic Information (pg. 46)
6 Compound Data, Part 1: Structures (pg. 51)
7 The Varieties of Data (pg. 79)
Intermezzo 1: Syntax and Semantics (pg. 97)
II Processing Arbitrarily Large Data (pg. 117)
9 Compound Data, Part 2: Lists (pg. 117)
10 More on Processing Lists (pg. 137)
11 Natural Numbers (pg. 153)
12 Composing Functions, Revisited Again (pg. 168)
Intermezzo 2: List Abbreviations (pg. 183)
III More on Processing Arbitrarily Large Data (pg. 189)
14 More Self-referential Data Definitions (pg. 189)
15 Mutually Referential Data Definitions (pg. 209)
16 Development through Iterative Refinement (pg. 221)
17 Processing Two Complex Pieces of Data (pg. 228)
Intermezzo 3: Local Definitions and Lexical Scope (pg. 259)
IV Abstracting Designs (pg. 283)
19 Similarities in Definitions (pg. 283)
20 Functions are Values (pg. 299)
21 Designing Abstractions from Examples (pg. 306)
22 Designing Abstractions with First-Class Functions (pg. 319)
23 Mathematical Examples (pg. 334)
Intermezzo 4: Defining Functions on the Fly (pg. 350)
V Generative Recursion (pg. 357)
25 A New Form of Recursion (pg. 357)
26 Designing Algorithms (pg. 368)
27 Variations on a Theme (pg. 381)
28 Algorithms that Backtrack (pg. 406)
Intermezzo 5: The Cost of Computing and Vectors (pg. 417)
VI Accumulating Knowledge (pg. 441)
30 The Loss of Knowledge (pg. 441)
31 Designing Accumulator-Style Functions (pg. 450)
32 More Uses of Accumulation (pg. 466)
Intermezzo 6: The Nature of Inexact Numbers (pg. 478)
VII Changing the State of Variables (pg. 491)
34 Memory for Functions (pg. 491)
35 Assignment to Variables (pg. 496)
36 Designing Functions with Memory (pg. 507)
37 Examples of Memory Usage (pg. 521)
Intermezzo 7: The Final Syntax and Semantics (pg. 548)
VIII Changing Compound Values (pg. 573)
39 Encapsulation (pg. 573)
40 Mutable Structures (pg. 587)
41 Designing Functions that Change Structures (pg. 608)
42 Equality (pg. 637)
43 Changing Structures, Vectors, and Objects (pg. 642)
Epilogue (pg. 677)
Index (pg. 683)

Mattheias Felleisen

Matthias Felleisen is Trustee Professor of Computer Science at Northeastern University, recipient of the Karl V. Karlstrom Outstanding Educator Award, and co-author (with Daniel Friedman) of The Little Schemer and three other "Little" books published by the MIT Press.


Robert Bruce Findler

Robert Bruce Findler is Assistant Professor of Electrical Engineering and Computer Science at Northwestern University.


Matthew Flatt

Matthew Flatt is Associate Professor in the School of Computing at the University of Utah.


Shriram Krishnamurthi

Shriram Krishnamurthi is Assistant Professor of Computer Science at Brown University.


eTextbook
Go paperless today! Available online anytime, nothing to download or install.
Device Compatibility

Features

  • Bookmarking
  • Note taking
  • Highlighting
Support