General Suggestions for the PC
Here is some general PC advice. No doubt you have heard this advice
before, but please take it seriously.
Back up everything!
Windows 3.x and 95 are not very robust; applications are allowed to write
on memory locations belonging to other programs and the operating system,
which can result in a crash. Programming
in C++ is prone to operating system crashes, since it is the
programmer's responsibility to stay in the right part of memory.
Even if you are careful, you will probably crash your operating
system eventually -- this is part of the learning process.
Most crashes are not harmful.
If your system hangs (doesn't respond), hit ctrl-alt-delete and reboot.
All should be OK after this. Turbo C++ has safeguards which protect you
from losing your C++ work (but not necessarily work in other programs)
in a system crash. Reopen your project, find your
error, and try again. If cntl-alt-delete doesn't work, your only
alternative is to turn the computer off. Wait 30 seconds before turning
it back on. Try to minimize this type of crash because it is rough on your
hardware.
In a rare case, you may have a fatal crash. The problem is that
the operating system crashed while critical information was stored in
memory which did not get written to disk. You may need
to reinstall Windows or (even more rarely) reformat your hard drive.
If this happens, you will regret not having backups of everything on your
hard drive!
Sometimes the computer will give you messages indicating that
you should close all programs and restart the computer. Follow the
given instructions. The computer has detected corruption of the operating
system loaded in memory and simply needs to be restarted.
Here are some don'ts that will help you to avoid system
crashes.
-
Don't run an executable created by the compiler when there are linking errors.
Sometimes the executable gets created, even though the linking procedure
is incomplete.
-
Don't ignore warnings given by the compiler/linker. You should strive to
figure out every warning given by the compiler/linker. I have generally
found that the warnings are fairly accurate and spot problems which I
missed. Sometimes ignoring a warning can result in a General Protection
Fault and a system crash.
-
Don't keep opening and closing Windows programs in the same Windows session.
Windows programs are notorious for not returning resources back to the
operating system after they are finished, so repeated opening and closing
can deplete the operating system of resources. Simply exit and restart
Windows to replenish the resources.
You should also make backups of the original C++ source code for the
class in case at 11 p.m. the night before the homework is
due you realize that your code is hopelessly screwed up and you
can't remember the original code. Also, don't wait until
11 p.m. the night before to download the programs from the WEB, in case
the server or network is down.
Get virus protection!
If you use the same disks in a home computer and in the lab, get
virus protection! A free virus checker/cleaner is available in the
computer lab, and it is updated every 2 or 3 months. A colleague and I both
had viruses on our PCs from a lab computer, even though we do not
use the lab often. The virus checker which is packaged
with your computer is most likely outdated and should not be relied
upon to protect you. A virus can be serious enough to destroy your
hardware (such as your hard drive or your monitor).
Keep a Clean House
Use subdirectories to keep your computational finance files separate from your
your compiler files, these files separate from your system files,
these files separate from... The Windows compilers I have used generate
several support files which are nonessential after making an application.
You should have these in a single subdirectory so you can delete them later
and yet be confident that you haven't deleted an essential system file
or library. The compiler should be completely indifferent to where you
store the files, as long as the path variable is properly specified
during the installation. (This should be automatic.)