- Planning:
-
Estimating how long the assignment will take, deciding what
features to implement in what order, setting milestones for completion of
various parts of the problem by specific dates before the final deadline.
In the unlikely event that you make a serious error at this stage, it
probably won't be identified until post-mortem.
This stage tends to be intertwined with the "Analysis & Design" stage.
You can't develop a good estimate of how long the assignment will take
until you've given some thought to how you're going to solve it. On the
other hand, one of the things you need to budget time for is analysis &
design itself.
- Analysis and Design:
- For most Scheme programs, this can be broken down into sub-stages:
to be done in approximately that order.
If you later discover that you made wrong decisions
about this stuff, it means an error was created at this stage. Errors
created at this stage tend to be harder to repair than those created in
implementation.
- Coding:
- Writing code in Scheme, Java, C++, or some other formal
programming language. Errors created at this stage tend to be things
like matching quotation marks, matching
parentheses, misspellings, wrong number of arguments, etc. It's possible
that you might discover a design error in the process of writing code.
For most Scheme programs, the coding stage can be broken down into
sub-stages:
- Code review:
- You'll probably find a lot of coding errors,
and possibly a few design errors, at this point. The only way you can
create new errors at this point is by fixing old errors incorrectly.
- Compile/Syntax Check
- Now it's the computer's turn to scan for mistakes.
Use the "Check Syntax" button in DrScheme or the "Compile"
button in most Java or C++ development environments. Again, you'll probably
find a lot of coding errors, and possibly a few design errors, at this stage,
and the only way you can create new errors is by fixing old ones incorrectly.
- Testing & Debugging:
- If you run your program and it crashes or gives wrong answers,
you've discovered a defect in the "testing" stage. It was probably created
in either the coding or the design stages.
I generally call it a coding error if I had a
correct solution in my mind, but typed it in wrong: for example, I
used the wrong variable name, or have my parentheses or braces incorrectly
positioned (in such a way that it wasn't discovered in code review), or
things like that. It's a design error if the solution in my mind was wrong
or unworkable.
You're in this stage until the program works correctly (or you turn it in
incomplete).
- Post Mortem
- After you've completed the program, review the
process of writing it. What kinds of mistakes did you make, and how can
you avoid them (or detect them quickly) in future projects? In the
"planning" stage, did you allocate enough (or too much) time to the various
stages and milestones? Were your initial estimates too high, too low, or
pretty close to reality? Where did you waste a lot of time? Where did you
use your time well?