Not sure if this is exactly what you have in mind, but I have had good success with my method of "learning from my bugs". Whenever I encounter a difficult bug, I write a short entry in my bugs file. I detail what happened, what I overlooked, where I should have found the bug (coding, testing). I also write down lessons learned from it, and I try to regularly review the lessons.