CS 361
Program Development Planning
(by Allen Downey, modified by Dale Skrien)
Some of you may have trouble getting programs constructed efficiently and correctly. Here's some ideas to help you. The key idea is to identify intermediate steps between what you have and what you want. Each step should be a small change from its predecessor and should be thoroughly tested before the next step is made. Ideally, you shouldn't add more than a few lines of code at a time.
For example:
Then the important part: Compile, run, and debug the program after every change. If you can't get it to compile and run, it is almost always a bad idea to try to move on to something else and come back.
Things to do when you get stuck:
Experiment with different ways of doing the things you are already doing. You might improve the program, you might get insight into the problem, you might solve the problem, or you might make the problem go away altogether.