When you find a new bug, write a test covering this case and then code the fix.
Code examples for this lesson https://github.com/askeroff/testing-r...
The book I was trying to remember is "The Pragmatic Programmer: From Journeyman to Master"
https://www.amazon.com/Pragmatic-Prog...