3 ms·
It is a good approach. The PLT Scheme textbook How to Design Programs walks you through a process for writing new code that more or less goes like that: 1. Wri
by etal 17y ago
It is a good approach. The PLT Scheme textbook How to Design Programs walks you through a process for writing new code that more or less goes like that:
1. Write a comment describing the problem.
2. Write comments describing the form of all the data structures involved in the problem, and turn those comments into data definitions.
3. Then write a comment describing the input and output of a function, write the function header, use the form of the data structures defined above to sketch a function body with comments and a few bits of code; repeat for each operation.
4. Finally, fill in the gaps -- at that point it's almost obvious how each function should be written.