This is
the hardest part because if we find problems we have to reevaluate not only
the “coding” phase but the design phase as
well. The algorithm we developed in step one as well as our translation of that algorithm into C++ has to be
thoroughly checked for mistakes. The longer
and more complex the program we are writing the greater the percentage of development time that this type of debugging uses
up.
You have
already been through the “coding” and compilation phases when you copied down and compiled the addition program yesterday. Some of you
also went though part a) of the debugging
phase.
You can
expect to go through the programming cycle numerous times. That is why it is important for you to become as familiar as possible with
your development environment (which for
most of you will be emacs). The more familiar you are with your environment
the faster and more accurately you will be
able to make changes to your source code, compile your program and address any errors.
Most of
the time you spend on Project 1 will be spent looking for bugs. Once you have
an idea of the correct algorithm for
solving the problem implementing it in C++ shouldn’t take more than an hour or
two. But you will spend a lot of time
fixing typos and checking that your algorithm really does what you thought it should do. 90% of the time spent C++
programming is spent in the debugging phase.
12 days
may look like a long time but you are probably going to need all of it. I
would recommend that you have an outline of
how your program is going to work at least by the end of the weekend. Then you
can spend next week fixing errors and if
necessary redesigning your algorithm.