Basically the lazy method, I don't wish to re-invent the wheel, so what I do is to accumulate any code or methods that is close to my projects that have been posted out there on the web, including any app notes by the micro manuf etc.
I then use these as a basis for modifying and writing the...