posted 8 years ago
There's not one single resource that I formed my habits of testing from. I've picked up things along the way from one book or another. Refactoring by Martin Fowler, OO Analysis and Design by Craig Larman, Design Principles by Robert "Uncle Bob" Martin, Four Rules of Simple Design by Corey Haines based on work by Kent Beck, ... the list goes on and on. Those authors will cite other books or each other, so you go back and read those, then you end up coming full circle and reading the same passages again and gain more insight, go back and practice some more, read the things again and gain more insight, practice again, ... and so on and so forth. It's a never-ending cycle of reading, practice, gaining insights. Central to all this, of course, is the mindful practice you have to do.
Practicing really does help. Just like athletes who get more reps in during practice, the more reps you get in by just writing small programs while focusing on fundamentals and principles, the easier it gets to actually do it on the job. But keep in mind what every music teacher ever has said at one time or another: "Practice only makes habit. Only perfect practice makes perfect." So practice doing the right things and you'll end up with the habit of (almost always) doing things right. And when you do mess up, your mistakes are easier to find and easier to fix.
Good luck.