Google’s Misko Hevery has posted slides from the tutorial he gave at OOPSLA’09 on how to write code that’s hard to test. It includes a few hints on how to write code that isn’t, too 🙂