One of the ways to prevent a thousand compile errors after you enter
your "program" is to incrementally compile. You enter a portion of
your class, then compile it. That way you should make sure all your
references are consistent, you arguments are clean, your returns are
correct....
Part of developing a program in to incrementally develop it.
I define the objects I need and how they are going to interface (what
methods I in each class) first. Then, I get them to compile.
I begin developing the internals of the methods and use a good step
debugger to step through the code, see if the values I THOUGHT I was
getting is what I am ACTUALLY getting. Each method is debugged as I
develop it.
By the time I've finished doing the entire program, I usually end up
with code that AT LEAST plays well with itself. Then, I integrate it
into the overall system and test how it plays with others.
If I have gotten the requirments down correctly, then I usually
release "bug-free" code. It take a little longer in the development
cycle, but when you realize that if you develop "monolithically" over
60% of your time is spend debugging... It's worth it.
Anthony is right... Debugging is the biggest headache in the
development cycle. A good IDE (Integrated Development Environment)
will help in the debugging. Eclipse ( http://www.eclipse.org ) (a
free one) also has a "scrapbook" where you can write "snippets" of
code and execute them to see if they work BEFORE you put them into
your code...
Now you have my clock... and all you asked was the time.