What Have We Learned?: Foundations of Computing, Fall 2000
December 5, 2000
Foundations of Computing has a scientific emphasis. It is intended to
teach concepts, methods, ways of thinking and working that apply to
computing generally. It deliberately does not have a vocational
emphasis. It does not concentrate on developing skills using
particular products.
We have written and studied some small programs in the Scheme
language. (Small does not mean easy or insignificant.) In addition
to learning Scheme, we have also learned about issues that occur in
all programs in all languages.
Some of these lessons are pertintent to learning any technical subject.
-
Learning new concepts rather than relying on experience or intuition.
Reliance upon understanding rather than imitation.
-
Precision in vocabulary, concepts, and behavior. Close attention to
descriptions and instructions. Ability to perceive and apply subtle
distinctions. Not to be confused by superficial resemblances.
Other lessons concern programming languages in particular.
-
Each programming language construct has a fixed
definite appearance (syntax) and meaning (semantics) which you must
understand completely and use correctly. Constructs that look similar
may have very different meanings. In Scheme: quoted or not, symbol
vs. list with one element, etc.
-
The distinction between writing a program and running a program.
In Scheme: define vs. everything else.
In DrScheme: Definitions Window vs. Interactions window.
-
Recognizing syntactic elements of the programming language. In Scheme:
expressions, atoms, symbols, strings, numbers, lists.
-
The distinction between data and procedures.
-
Data can represent procedures, procedures can be treated as data.
Obvious in Scheme but true in all languages.
-
Each object has a type. In Scheme: numbers, lists, booleans, strings,
procedures etc. In Scheme an object can have more than one type.
Procedures are designed to work with particular types.
-
Data structures represent relations among data items. In Scheme:
lists, association lists (tables and dictionaries), trees, graphs
(networks)
-
Variables. Names and values. How to define a variable. How names
are bound to values. What an unbound variable is. What happens when
you try to use an unbound variable.
-
Distinction between global variables (recognized everywhere) and local
variables (recognized only within a procedure or some other limited scope).
Local variables that have the same name but are defined in different scopes
are distinct. What happens when a local variable has the same name as
a global variable.
-
Evaluation. How expressions are evaluated. Which expressions can be evaluated.
What happens when you try to evaluate an expression that can't be evaluated.
When and how to prevent an expression from being evaluated. In Scheme: quote.
-
Procedures. How to define a procedure. Formal parameters.
-
Procedure calls. How to call a procedure. Arguments. How actual
arguments are bound to formal parameters. What happens if the
arguments are unbound or the wrong type.
-
How to put procedures together to make bigger procedures.
How to make the results of one procedure be used by another procedure.
In Scheme: functional composition and higher order functions.
Some lessons concern programming methodology and software engineering.
-
Design: Given a task, break the task down into procedures.
-
Construction: Build and test each expression and procedure as you go.
Make sure each piece works.
-
Explaining what a program does.
-
Showing that a program does what you say it does.
Some lessons apply to life in general.
-
Patience. Persistence. Master the elementary material before attempting
the more advanced.
-
Impatience. Confidence. Attempt to grasp the direction of new material without
understanding all the details at first.
-
Know what your capabilities are. Pick something you know you can do.
-
Try things you don't fully understand yet. Start something ambitious
with the expectation that you can learn what you need to fill in the details.
Jon Jacky, jackyj@evergreen.edu