Writing APIs for testable code
While reading a discussion over at Red-Gate Software about “relentlessly testing” code, there was mention about how all their products have an API and a light-bulb went off! For code to be testable, you have to write it as if it were an API.
This would help orientate your thinking to help make for a loosely-coupled design. Then your program logic could be called by testing frameworks, hooked up with user interface controls, etc.