Created
May 20, 2018 01:49
-
-
Save Momus/97c560f95f1cb742e2ff16c54385d667 to your computer and use it in GitHub Desktop.
Thinking Forth p12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Successive Refinement | |
An approach that relies heavily on subroutines is called “Successive Refinement.” | |
The idea is that you begin by writing a skeletal version of your program | |
using natural names for procedures for data structures. | |
Then you write versionsof each of the named procedures. | |
You continue this process to greater levels of detail until | |
the procedures can only be written in the computer language itself. | |
At each step the programmer must make decisions about the algorithms | |
being used and about the data structures they’re being used on. Decisions | |
about the algorithms and associated data structures should be made in parallel. | |
If an approach doesn’t work out the programmer is encouraged to back | |
track as far as necessary and start again. | |
Notice this about successive refinement: You can’t actually run any part | |
of the program until its lowest-level components are written. Typically this | |
means you can’t test the program until after you’ve completely designed it. | |
Also notice: Successive refinement forces you to work out all details of | |
control structure on each level before proceeding to the next lower level. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment