I just posted a the presentation and sample code from the Lessons Learned in Programmer Testing sessions that I did at a few conferences this summer. Click here for the details.