Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
I see many of you wasting large blocks of time on debugging. As you already know, the requirements of this class are such that you cannot afford to waste any time. Below are
 

Summary: Debugging
I see many of you wasting large blocks of time on debugging. As you already know, the
requirements of this class are such that you cannot afford to waste any time. Below are
my suggestions for debugging. I have been programming for 35 years! While I don't
pretend to have all the answers, these techniques work! Give them a try.
1) If you are asking someone for help getting started, show them your attempts at a
solution. You may be totally wrong, but at least the tutor can see quickly where you
are at.
2) After you finish entering your code, get a printed copy and read it. You are not
looking for syntax errors, but for logic errors. You want to see the logical
functioning at a higher level. This simple practice can save you an hour of debugging
per program. You can find several mistakes in a few minutes.
3) Program defensively. Write an assert routine such as
public class BadData extends Exception
{
public BadData(String msg)
{ super(msg);
}
}
public void assert(boolean b,String msg)

  

Source: Allan, Vicki H. - Department of Computer Science, Utah State University

 

Collections: Computer Technologies and Information Sciences