Sunday, March 8, 2009


Debugging TIPS

(image from, nice themed rocks)

This is based on my personal experience, of course.. I program in Netbeans with Java as my language hakhak :)

TIPS when debugging:

1. Check the spellings! from the code to the content of the database to anywhere the classes are concern!

2. Check the logic.
There are two kinds of errors: syntax and logic. Netbeans automatically detects syntax error and other programming tools also do so. But logic errors are the weakness of any computer system. As programmer, you are held responsible of the flow of logic. So when things are not as what they supposed to be in your program/modules, check the logic. Trace the flow from the first call of the classes,methods, variables to the the end use.

3. Put debugging statements!
System.out.println(of course put something here);
JOptionPane.showmessagedialog(null,"It passed here!");
System.out.println("The variable is: "+ var);
JOptionPane.showmessagedialog(null, "Count is: "+count);

I put statements like "wtf, it passed here!, that was the result" to help me trace the bugs. I don't have to use insecticides for this!hahahaha

4. Ask a Friend!

Programmer1: Hi! Hello friend! I cannot f**king find the bug of my program. When i enter this, the other one won't show up like what it should! Could you please find the bug for me???

Friend: WTF, i dont program,all I know is to play DOTA

Programmer1: WTF! Get lost Major Loser!!!!

Moral: Ask a friend that is knowledgable in the field of programming.

Still cannot find the bugs? Take a break! Your brain might just be breaking. Rest for a while, don't worry! The more you worry, the more you won't be able to find those f**kin bugs.

Enjoy debugging!! :)

2 Reactions to this post

Add Comment
  1. johnlazy said... March 8, 2009 at 8:55 AM

    Wow you are a programmer chick, Nice header by the way. You are a smart lady ha! Take care always I'm happy I got to know some bloggers here in zamboanga. - John Lazy

    Maybe you can add also name/url in your comment form. So its easier to comment for those non blogger user.

  2. johnlazy said... March 9, 2009 at 7:56 AM

    Well friend you can set up the comment form in your bloggers settings. Take care! It takes you few seconds to do it.