  We propose and carry-out a novel method of formative assessment called
Assessment via Teaching (AVT), in which learners demonstrate their
understanding of CS1 topics by tutoring more novice students. AVT has powerful
benefits over traditional forms of assessment: it is centered around service to
others and is highly rewarding for the learners who teach. Moreover, teaching
greatly improves the learners' own understanding of the material and has a huge
positive impact on novices, who receive free 1:1 tutoring. Lastly, this form of
assessment is naturally difficult to cheat -- a critical property for
assessments in the era of large-language models.
  We use AVT in a randomised control trial with learners in a CS1 course at an
R1 university. The learners provide tutoring sessions to more novice students
taking a lagged online version of the same course. We show that learners who do
an AVT session before the course exam performed 20 to 30 percentage points
better than the class average on several questions. Moreover, compared to
students who did a practice exam, the AVT learners enjoyed their experience
more and were twice as likely to study for their teaching session. We believe
AVT is a scalable and uplifting method for formative assessment that could one
day replace traditional exams.
