If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

It might be one of the most basic things, but I think it is worth a mention in a Debugging 101 thread:

Use comments as much as possible to explain what you are doing with the code and why. Your code might look crystal clear to you now, but if you go back to that same piece of code 5 months later, you might not see immediately why you wrote the code the way you did. It can also help if you need to do a search within your code for a specific section.

I can't tell you how many times I've gone back to a file months after the fact and if it hadn't been for my comments it would have taken me an hour or two just to figure our why I wrote the page that way.