is an excellent book by Andrew Hunt and Dave Thomas (isbn 0-201-61622-X). As usual I'm going to quote from a few pages:
A very simple but particularly effective technique for finding the cause of a problem is simply to explain it to someone else.
Fred doesn't know why the code is failing because he didn't know why it worked in the first place.
Chips are designed to be tested.
Design to Test.
Abstractions live longer than details.
Some things are better done than described.
Don't give in to the false authority of a method.
Test Early. Test Often. Test Automatically.
Organize around functionality, not job functions.
When woodworkers begin a project, they cut the longest pieces first, then cut the smaller pieces out of the remaining wood.
The Law of Demeter for functions states that any method of an object should call only methods belonging to: itself, any parameters that were passed in to the method, any objects it creates, and directly held component objects.