Design Recipes
Basic design recipe for Scheme functions
(or functions in most other languages, for that matter!)
To solve any problem, in
any area (not just programming), requires three steps:
- Figure out what you need to do.
- Do it.
- Check that you did it right.
Most of the buggy programs in the world can be blamed on
skipping either the first or the third of these steps.
The ten steps of version 3 of the Design Recipe
are merely an elaboration of these three:
- (1) Figure out what you need to do
-
- (1a) Understand the assignment
informally
- (1b) Write a function contract specifying
what kind of information goes in and what kind comes out
- (1c) Analyze the data types going in and
out
- (1d) Write examples of how the
function will be used, with correct answers
- (2) Do it
-
- (2a) Write the function's Skeleton
- (2b) Choose and use an appropriate Template
- (2c) Fill in the Function Body
- (3) Check your work
-
- (3a) Proofreading
- (3b) Syntax checking
- (3c) Testing
Last modified:
Mon Mar 4 13:08:47 EST 2002
Stephen Bloch / sbloch@adelphi.edu