[an error occurred while processing this directive]
cs150: Notes 4
- Week of 22 January: Read Chapter
4 and Chapter 5 of the course book.
- (extended from 29 January) Before Monday, 5 February: Read GEB, Little Harmonic Labyrinth and GEB, Chapter 5
- Friday, 2 February (beginning of class): Problem Set 2
Two especially useful DrScheme commands:
- [Tab] — Press the [Tab] key for DrScheme to indent your code
structurally. All your code should be divided into logical lines that
fit in the page with, and indented to show its structure clearly. To
indent all your definitions, use Ctrl-I.
- Esc-P — In the interactions window, use
Esc-P to retrieve your last command. To go further back, press
Esc-P again. This saves typing when you are trying different
Procedures and Evaluation Practice
- First, make sure you know what the procedure is intended to do.
You should know what the inputs are (and what types of values they are),
and what type of value the output is (e.g., a procedure, a number, a
list). You should also have some example inputs and outputs in mind.
- Before worrying about the code, think in English how you will solve
- Define the procedure.
- Test your procedure with the example inputs and outputs. Think
about any tricky cases that you should also test.