By writing tests before code, programmers are forced to
“differentiate between the functionality to implement and
the base condition under which the implementation has to
work” [19]. This forces programmers to make better design
decisions during development. Most controlled
experiments between TDD and other testing practices show
an increase in quality of code, or minimal differences.
Depending on what control group the TDD group was
being compared against, results were between a 35%[22]
and 45%[5] reduction in defects. Changes in productivity
varied by experiment. Some experiments found vast
improvements in productivity, between 24.5%[22] and
50%[13]. Others found less hopeful results of a 5-10%
decrease in productivity [11]. Surveys from students have
indicated an increase in program understanding [18] and
confidence in making changes to the code and code
correctness [19]. These results tended to be more positive
in more advanced courses. Mature programmers noticed
the benefits of TDD and could conduct its practices
correctly, where beginner programmers struggled to
understand the purpose of testing.