The best teacher, at least for software developers, is strict automation that yells at you when you are in violation and guides you in moments of confusion. This is how I first learned to write software as a self taught developer many years ago, using a tool called JSLint. Back in the day it came with a warning: JSLint may hurt your feelings.