Version: 4.1.4.3

How to Design Programs, Second Edition

Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, Shriram Krishnamurthi

Bad programming is easy. Idiots can learn it in 21 days, even if they are dummies.

Did you see the italic text? It introduces a technical term. For this introduction, we leave it up to you to figure out what kind of technical terms these are.

Good programming requires thought, but everyone can do it and everyone can experience the satisfaction that comes with it. The price is worth paying for the sheer joy of the discovery process, the elegance of the result, and the commercial benefits with which a systematic program design process comes.

The goal of our book is to introduce readers of all ages and backgrounds to the craft of designing programs systematically. We assume few prerequisites: arithmetic, a tiny bit of middle school algebra, and the willingness to think through issues. We promise that the travails will pay off not just for future programmers but for anyone who has to follow a process or create one for others.

We are grateful to Ada Brunsteain, our editor at MIT Press, who gave us permission to develop this second edition of "How to Design Programs" on-line.

    1 Prologue: How to Program

      1.1 Arithmetic and Arithmetic

      1.2 Real Programs Consume Inputs & Produce Output

      1.3 If there are Many Ways to Compute Outputs, ...

      1.4 Good Programs Consist of Many Definitions

      1.5 One More Definition

      1.6 You are a Programmer Now

      1.7 Not!

    2 Arithmetic

      2.1 The Arithmetic of Numbers

      2.2 The Arithmetic of Strings

      2.3 Mixing It Up

      2.4 The Arithmetic of Chars

      2.5 The Arithmetic of Images

      2.6 The Arithmetic of Booleans

      2.7 Mixing It Up with Booleans

      2.8 Predicates: Know Thy Data

    3 Functions and Programs

      3.1 Defining Functions

      3.2 Applying Functions

      3.3 Functions and Worlds

      3.4 Conditional Functions

      3.5 Composing Functions

    4 How to Design Functions

      4.1 Information and Data

      4.2 The Process

      4.3 Designing Worlds

      4.4 Domain Knowledge