Try Test-Driven Development 【Source code of http://www.unknownerror.org/】