Testing is a very important part of quality control in education. To decide how to best test, it makes sense to use experience of other areas where testing is important, where there is a large amount of experimental data comparing the efficiency of different testing strategies. One such area is software engineering. The experience of software engineering shows that the most efficient approach to testing is to test thoroughly on every single stage of the project. In regards to teaching, the resulting recommendation means making testing as frequent as possible, preferably giving weekly quizzes. At first glance, this may seem difficult, since grading quizzes -- especially for big classes -- requires a lot of time, and instructors usually do not have that much time. This problem can be solved by giving multiple-choice quizzes for which grading can be automatic. Automatic grading also helps make grading more objective -- and thus, eliminate perceived grading subjectivity as a potential problem affecting student learning.