Computer Science Logo Style

Symbolic Computing

Computer Science Logo Style

Volume 1: Symbolic Computing

Brian Harvey

University of California, Berkeley

Below this short table of contents is an expanded table of contents including sections within each chapter. Click on the chapter name to jump down. You can also download the complete text of each chapter in PDF format for elegant printing, or browse the HTML version.

Note: These books are still in copyright, and in print. They are posted here for your personal use, not for resale or redistribution. Thanks!

I don't know why suddenly everyone wants to translate this page to other languages, but here they are. It's just this page, not the whole book.

View this page in Romanian courtesy of azoft.

Slovakian translation courtesy of Gasper Halipovich.

Vietnamese translation courtesy of Julia Duong from coupofy.com.

Russian Translation Courtesy of Search-Sos.

The Intellectual Content of Computer Programming

Computer Science Apprenticeship

About the Second Edition

Why Logo?

Hardware and Software Requirements

Words of Wisdom

Acknowledgements (HTML)

Getting Acquainted with Logo...

... in Two Senses

Another Greeting

Fooling Around

A Slightly Longer Conversation

A Sneaky Greeting

A Quiz Program

Saving Your Work

About Chapter 2

No Exercises

Procedures and Instructions

Technical Terms

Evaluation

Error Messages

Commands and Operations

Words and Lists

How to Describe a Procedure

Manipulating Words and Lists

Print and Show

and Order of Evaluation

Special Forms of Evaluation

Writing Your Own Procedures

Editing Your Procedures

Syntax and Semantics

Parentheses and Plumbing Diagrams

Nonsense Plumbing Diagrams

User Procedures With Inputs

What Kind of Container?

An Abbreviation

More Procedures

An Aside on Variable Naming

Don't Call It X

Writing New Operations

Scope of Variables

The Little Person Metaphor

Changing the Value of a Variable

Global and Local Variables

Indirect Assignment

Functional Programming

True or False

Defining Your Own Predicates

Conditional Evaluation

Choosing Between Alternatives

Conditional Evaluation Another Way

About Those Brackets

Logical Connectives

Ifelse as an Operation

as an Operation Expression Lists and Plumbing Diagrams

Stopping a Procedure

Improving the Quiz Program

Reporting Success to a Superprocedure

The Problem: Initials

One Solution: Numeric Iteration

Critique of Numeric Iteration

What's a Function?

Functions of Functions: Map

Higher Order Selection: Filter

Many to One: Reduce

Choosing the Right Tool

Anonymous Functions

Higher Order Miscellany

Repeated Invocation: Cascade

A Mini-Project: Mastermind

This program plays the game of Tic Tac Toe against the user. It follows a perfect strategy, so it always wins or ties.

The Project

Strategy

Program Structure and Modularity

Data Representation

Arrays

Triples

Variables in the Workspace

The User Interface

Implementing the Strategy Rules

Further Explorations

Program Listing

Starting Small

Building Up

Generalizing the Pattern

What Went Wrong?

The Stop Rule

Local Variables

More Examples

Other Stop Rules

Recursive Patterns

The Leap of Faith

The Tower of Hanoi

More Complicated Patterns

A Mini-Project: Scrambled Sentences

Procedure Patterns

Tricky Stop Rules

Little People and Recursion

Tracing

Level and Sequence

Instruction Stepping

A Review, or a Brief Introduction

Local vs. Global Descriptions

The Turtle's State

Symmetry

Fractals

Further Reading

A Simple Substitution Cipher

More Procedure Patterns

The Filter Pattern

Pattern The Reduce Pattern

Pattern The Find Pattern

Pattern Numerical Operations: the Cascade Pattern

Pattern Pig Latin

A Mini-Project: Spelling Numbers

Advanced Recursion: Subsets

A Word About Tail Recursion

This project demonstrates the use of a slightly complex cipher, in which a given letter in the original text is not always represented by the same letter in the coded version.

Data Redundancy

Composition of Functions

Conversational Front End

Further Explorations

Program Listing

Structured Programming

Critique of Structured Programming

A Sample Project: Counting Poker Hands

An Initialization Procedure

Second Edition Second Thoughts

Planning and Debugging

Classifying Poker Hands

Embellishments

Putting the Project in a Context

Program Listing

This program solves the category of problems in which you are given pitchers of certain sizes and asked to use them to measure a specified amount of water from a river.

Tree Search

Depth-First and Breadth-First Searching

Data Representation

Abstract Data Types

Sentence as a Combiner

as a Combiner Finding the Children of a Node

Computing a New State

More Data Abstraction

Printing the Results

Efficiency: What Really Matters?

Avoiding Meaningless Pourings

Eliminating Duplicate States

Stopping the Program Early

Further Explorations

Program Listing

Using Error Messages

Invalid Data

Incorrect Results

Tracing and Stepping

Pausing

Final Words of Wisdom

Appendices (backmatter in PDF)

A. Running Berkeley Logo (HTML)

Getting Berkeley Logo

Berkeley Logo for DOS Machines

Berkeley Logo for the Macintosh

Berkeley Logo for Unix

B. GNU General Public License (HTML)

Index of Defined Procedures (HTML)

General Index (HTML)