Four excellent talks by Miško Hevery on writing testable code: